summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_c_locale_coercion.py
diff options
context:
space:
mode:
authorMalcolm Smith <smith@chaquo.com>2024-03-11 19:25:39 (GMT)
committerGitHub <noreply@github.com>2024-03-11 19:25:39 (GMT)
commit872c0714fcdc168ce4a69bdd0346f2d5dd488ec2 (patch)
tree84934c17e5561cc36d337d83b436fcc5bb40fd88 /Lib/test/test_c_locale_coercion.py
parent9f983e00ec55b87a098a4c8229fe5bb9acb9f3ac (diff)
downloadcpython-872c0714fcdc168ce4a69bdd0346f2d5dd488ec2.zip
cpython-872c0714fcdc168ce4a69bdd0346f2d5dd488ec2.tar.gz
cpython-872c0714fcdc168ce4a69bdd0346f2d5dd488ec2.tar.bz2
gh-71052: Change Android's `sys.platform` from "linux" to "android"
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Diffstat (limited to 'Lib/test/test_c_locale_coercion.py')
-rw-r--r--Lib/test/test_c_locale_coercion.py21
1 files changed, 10 insertions, 11 deletions
diff --git a/Lib/test/test_c_locale_coercion.py b/Lib/test/test_c_locale_coercion.py
index 7334a32..e4b0b8c 100644
--- a/Lib/test/test_c_locale_coercion.py
+++ b/Lib/test/test_c_locale_coercion.py
@@ -26,17 +26,16 @@ EXPECT_COERCION_IN_DEFAULT_LOCALE = True
TARGET_LOCALES = ["C.UTF-8", "C.utf8", "UTF-8"]
# Apply some platform dependent overrides
-if sys.platform.startswith("linux"):
- if support.is_android:
- # Android defaults to using UTF-8 for all system interfaces
- EXPECTED_C_LOCALE_STREAM_ENCODING = "utf-8"
- EXPECTED_C_LOCALE_FS_ENCODING = "utf-8"
- else:
- # Linux distros typically alias the POSIX locale directly to the C
- # locale.
- # TODO: Once https://bugs.python.org/issue30672 is addressed, we'll be
- # able to check this case unconditionally
- EXPECTED_C_LOCALE_EQUIVALENTS.append("POSIX")
+if sys.platform == "android":
+ # Android defaults to using UTF-8 for all system interfaces
+ EXPECTED_C_LOCALE_STREAM_ENCODING = "utf-8"
+ EXPECTED_C_LOCALE_FS_ENCODING = "utf-8"
+elif sys.platform.startswith("linux"):
+ # Linux distros typically alias the POSIX locale directly to the C
+ # locale.
+ # TODO: Once https://bugs.python.org/issue30672 is addressed, we'll be
+ # able to check this case unconditionally
+ EXPECTED_C_LOCALE_EQUIVALENTS.append("POSIX")
elif sys.platform.startswith("aix"):
# AIX uses iso8859-1 in the C locale, other *nix platforms use ASCII
EXPECTED_C_LOCALE_STREAM_ENCODING = "iso8859-1"