[Python-checkins] bpo-31904: Fix test_c_locale_coercion encodings for VxWorks RTOS (GH-19448)

pxinwr webhook-mailer at python.org
Thu Apr 9 11:46:31 EDT 2020


https://github.com/python/cpython/commit/5cd28030092eaa8eb9223afd733974fd2afc8e2c
commit: 5cd28030092eaa8eb9223afd733974fd2afc8e2c
branch: master
author: pxinwr <peixing.xin at windriver.com>
committer: GitHub <noreply at github.com>
date: 2020-04-09T17:46:23+02:00
summary:

bpo-31904: Fix test_c_locale_coercion encodings for VxWorks RTOS (GH-19448)

files:
A Misc/NEWS.d/next/Tests/2020-04-09-16-29-18.bpo-31904.ej348T.rst
M Lib/test/test_c_locale_coercion.py

diff --git a/Lib/test/test_c_locale_coercion.py b/Lib/test/test_c_locale_coercion.py
index fb599b0fcb7a5..8340a9eb2ea3a 100644
--- a/Lib/test/test_c_locale_coercion.py
+++ b/Lib/test/test_c_locale_coercion.py
@@ -49,6 +49,10 @@
     # 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
index 0000000000000..0c08ab5631175
--- /dev/null
+++ b/Misc/NEWS.d/next/Tests/2020-04-09-16-29-18.bpo-31904.ej348T.rst
@@ -0,0 +1 @@
+Set expected default encoding in test_c_locale_coercion.py for VxWorks RTOS.



More information about the Python-checkins mailing list