]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-31904: Fix test_c_locale_coercion encodings for VxWorks RTOS (GH-19448)
authorpxinwr <peixing.xin@windriver.com>
Thu, 9 Apr 2020 15:46:23 +0000 (23:46 +0800)
committerGitHub <noreply@github.com>
Thu, 9 Apr 2020 15:46:23 +0000 (17:46 +0200)
Lib/test/test_c_locale_coercion.py
Misc/NEWS.d/next/Tests/2020-04-09-16-29-18.bpo-31904.ej348T.rst [new file with mode: 0644]

index fb599b0fcb7a58e3a229b2d2b3380b9248b68238..8340a9eb2ea3a36c76a87fec765d106010f04044 100644 (file)
@@ -49,6 +49,10 @@ elif sys.platform == "cygwin":
     # TODO: Work out a robust dynamic test for this that doesn't rely on
     #       CPython's own locale handling machinery
     EXPECT_COERCION_IN_DEFAULT_LOCALE = False
+elif sys.platform == "vxworks":
+    # VxWorks defaults to using UTF-8 for all system interfaces
+    EXPECTED_C_LOCALE_STREAM_ENCODING = "utf-8"
+    EXPECTED_C_LOCALE_FS_ENCODING = "utf-8"
 
 # Note that the above expectations are still wrong in some cases, such as:
 # * Windows when PYTHONLEGACYWINDOWSFSENCODING is set
diff --git a/Misc/NEWS.d/next/Tests/2020-04-09-16-29-18.bpo-31904.ej348T.rst b/Misc/NEWS.d/next/Tests/2020-04-09-16-29-18.bpo-31904.ej348T.rst
new file mode 100644 (file)
index 0000000..0c08ab5
--- /dev/null
@@ -0,0 +1 @@
+Set expected default encoding in test_c_locale_coercion.py for VxWorks RTOS.