Skip to content

Commit f0b6a26

Browse files
authored
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.
1 parent 286e1c1 commit f0b6a26

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Lib/test/test_c_locale_coercion.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,14 @@
1717

1818
# Set our expectation for the default encoding used in the C locale
1919
# for the filesystem encoding and the standard streams
20-
C_LOCALE_STREAM_ENCODING = "ascii"
20+
21+
# AIX uses iso8859-1 in the C locale, other *nix platforms use ASCII
22+
if sys.platform.startswith("aix"):
23+
C_LOCALE_STREAM_ENCODING = "iso8859-1"
24+
else:
25+
C_LOCALE_STREAM_ENCODING = "ascii"
26+
27+
# FS encoding is UTF-8 on macOS, other *nix platforms use the locale encoding
2128
if sys.platform == "darwin":
2229
C_LOCALE_FS_ENCODING = "utf-8"
2330
else:

0 commit comments

Comments
 (0)