]> granicus.if.org Git - python/commitdiff
bpo-30836: fix test_c_locale_coercion on AIX (GH-2713)
authorNick Coghlan <ncoghlan@gmail.com>
Sat, 15 Jul 2017 12:51:05 +0000 (22:51 +1000)
committerGitHub <noreply@github.com>
Sat, 15 Jul 2017 12:51:05 +0000 (22:51 +1000)
AIX uses iso8859-1 in the C locale, not ASCII

AIX doesn't currently provide any of the locale
coercion locales, but we leave locale coercion
enabled in case one gets added in the future.

Lib/test/test_c_locale_coercion.py

index f5a9fe34847a5e739dc9e3149d8ac6b928308d19..635c98faced9cdc53f5637185173345cdc9f646b 100644 (file)
@@ -17,7 +17,14 @@ from test.support.script_helper import (
 
 # Set our expectation for the default encoding used in the C locale
 # for the filesystem encoding and the standard streams
-C_LOCALE_STREAM_ENCODING = "ascii"
+
+# AIX uses iso8859-1 in the C locale, other *nix platforms use ASCII
+if sys.platform.startswith("aix"):
+    C_LOCALE_STREAM_ENCODING = "iso8859-1"
+else:
+    C_LOCALE_STREAM_ENCODING = "ascii"
+
+# FS encoding is UTF-8 on macOS, other *nix platforms use the locale encoding
 if sys.platform == "darwin":
     C_LOCALE_FS_ENCODING = "utf-8"
 else: