summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_c_locale_coercion.py
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2017-07-15 12:51:05 (GMT)
committerGitHub <noreply@github.com>2017-07-15 12:51:05 (GMT)
commitf0b6a261bb8cbede42296e0cc70956fb3b9a6cf7 (patch)
tree5171cccac1e9f910978e905f86e47b8a67ed4c3b /Lib/test/test_c_locale_coercion.py
parent286e1c15ceb28a76d8ef4fe7111718317c9ccaf5 (diff)
downloadcpython-f0b6a261bb8cbede42296e0cc70956fb3b9a6cf7.zip
cpython-f0b6a261bb8cbede42296e0cc70956fb3b9a6cf7.tar.gz
cpython-f0b6a261bb8cbede42296e0cc70956fb3b9a6cf7.tar.bz2
bpo-30836: fix test_c_locale_coercion on AIX (GH-2713)
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.
Diffstat (limited to 'Lib/test/test_c_locale_coercion.py')
-rw-r--r--Lib/test/test_c_locale_coercion.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/Lib/test/test_c_locale_coercion.py b/Lib/test/test_c_locale_coercion.py
index f5a9fe3..635c98f 100644
--- a/Lib/test/test_c_locale_coercion.py
+++ b/Lib/test/test_c_locale_coercion.py
@@ -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: