Skip to content

Commit e48e5b7

Browse files
committed
bpo-30672: Make POSIX locale coercion tests unconditional
1 parent 5f8b61c commit e48e5b7

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

‎Lib/test/test_c_locale_coercion.py‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
)
1616

1717
# Set the list of ways we expect to be able to ask for the "C" locale
18-
EXPECTED_C_LOCALE_EQUIVALENTS = ["C", "invalid.ascii"]
18+
EXPECTED_C_LOCALE_EQUIVALENTS = ["C", "invalid.ascii", "POSIX"]
1919

2020
# Set our expectation for the default encoding used in the C locale
2121
# for the filesystem encoding and the standard streams
@@ -31,12 +31,6 @@
3131
# Android defaults to using UTF-8 for all system interfaces
3232
EXPECTED_C_LOCALE_STREAM_ENCODING = "utf-8"
3333
EXPECTED_C_LOCALE_FS_ENCODING = "utf-8"
34-
else:
35-
# Linux distros typically alias the POSIX locale directly to the C
36-
# locale.
37-
# TODO: Once https://bugs.python.org/issue30672 is addressed, we'll be
38-
# able to check this case unconditionally
39-
EXPECTED_C_LOCALE_EQUIVALENTS.append("POSIX")
4034
elif sys.platform.startswith("aix"):
4135
# AIX uses iso8859-1 in the C locale, other *nix platforms use ASCII
4236
EXPECTED_C_LOCALE_STREAM_ENCODING = "iso8859-1"
@@ -53,7 +47,6 @@
5347
# Note that the above expectations are still wrong in some cases, such as:
5448
# * Windows when PYTHONLEGACYWINDOWSFSENCODING is set
5549
# * Any platform other than AIX that uses latin-1 in the C locale
56-
# * Any Linux distro where POSIX isn't a simple alias for the C locale
5750
# * Any Linux distro where the default locale is something other than "C"
5851
#
5952
# Options for dealing with this:

0 commit comments

Comments
 (0)