bpo-34347: Fix test_utf8_mode.test_cmd_line for AIX (GH-8923)
authorMichael Felt <aixtools@users.noreply.github.com>
Mon, 27 Aug 2018 13:40:17 +0000 (15:40 +0200)
committerVictor Stinner <vstinner@redhat.com>
Mon, 27 Aug 2018 13:40:17 +0000 (15:40 +0200)
AIX uses ISO-8859-1 encoding for the C locale.

Lib/test/test_utf8_mode.py
Misc/NEWS.d/next/Tests/2018-08-25-13-28-18.bpo-34347.IsRDPB.rst [new file with mode: 0644]

index 26e2e13ec5339facb09436faf3d0f5dd7e3c818e..3e918fd54ce3ca8ca99f208402830c55661c0399 100644 (file)
@@ -219,6 +219,8 @@ class UTF8ModeTests(unittest.TestCase):
         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 (file)
index 0000000..0959476
--- /dev/null
@@ -0,0 +1 @@
+Fix `test_utf8_mode.test_cmd_line` for AIX