[Python-checkins] bpo-34347: Fix test_utf8_mode.test_cmd_line for AIX (GH-8923)

Victor Stinner webhook-mailer at python.org
Mon Aug 27 09:40:22 EDT 2018


https://github.com/python/cpython/commit/7ef1697be54a74314d5214d9ba0580d4e620694c
commit: 7ef1697be54a74314d5214d9ba0580d4e620694c
branch: master
author: Michael Felt <aixtools at users.noreply.github.com>
committer: Victor Stinner <vstinner at redhat.com>
date: 2018-08-27T15:40:17+02:00
summary:

bpo-34347: Fix test_utf8_mode.test_cmd_line for AIX (GH-8923)

AIX uses ISO-8859-1 encoding for the C locale.

files:
A Misc/NEWS.d/next/Tests/2018-08-25-13-28-18.bpo-34347.IsRDPB.rst
M Lib/test/test_utf8_mode.py

diff --git a/Lib/test/test_utf8_mode.py b/Lib/test/test_utf8_mode.py
index 26e2e13ec533..3e918fd54ce3 100644
--- a/Lib/test/test_utf8_mode.py
+++ b/Lib/test/test_utf8_mode.py
@@ -219,6 +219,8 @@ def check(utf8_opt, expected, **kw):
         check('utf8', [arg_utf8])
         if sys.platform == 'darwin' or support.is_android:
             c_arg = arg_utf8
+        elif sys.platform.startswith("aix"):
+            c_arg = arg.decode('iso-8859-1')
         else:
             c_arg = arg_ascii
         check('utf8=0', [c_arg], LC_ALL='C')
diff --git a/Misc/NEWS.d/next/Tests/2018-08-25-13-28-18.bpo-34347.IsRDPB.rst b/Misc/NEWS.d/next/Tests/2018-08-25-13-28-18.bpo-34347.IsRDPB.rst
new file mode 100644
index 000000000000..0959476b9310
--- /dev/null
+++ b/Misc/NEWS.d/next/Tests/2018-08-25-13-28-18.bpo-34347.IsRDPB.rst
@@ -0,0 +1 @@
+Fix `test_utf8_mode.test_cmd_line` for AIX



More information about the Python-checkins mailing list