]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-31904: Fix test_utf8_mode on VxWorks (GH-12428)
authorhliu0 <hongchang.liu@windriver.com>
Wed, 27 Mar 2019 15:11:12 +0000 (23:11 +0800)
committerVictor Stinner <vstinner@redhat.com>
Wed, 27 Mar 2019 15:11:12 +0000 (16:11 +0100)
 Python always use UTF-8 on VxWorks.

Lib/test/test_utf8_mode.py
Misc/NEWS.d/next/Tests/2019-03-19-17-39-25.bpo-31904.QxhhRx.rst [new file with mode: 0644]

index 220ff34a1189ce1f5a9e3fae29ea83b5d31a4edd..2429b00459be51ded35c8afc74091711f881aeba 100644 (file)
@@ -12,7 +12,7 @@ from test.support.script_helper import assert_python_ok, assert_python_failure
 
 MS_WINDOWS = (sys.platform == 'win32')
 POSIX_LOCALES = ('C', 'POSIX')
-
+VXWORKS = (sys.platform == "vxworks")
 
 class UTF8ModeTests(unittest.TestCase):
     DEFAULT_ENV = {
@@ -225,7 +225,7 @@ class UTF8ModeTests(unittest.TestCase):
             with self.subTest(LC_ALL=loc):
                 check('utf8', [arg_utf8], LC_ALL=loc)
 
-        if sys.platform == 'darwin' or support.is_android:
+        if sys.platform == 'darwin' or support.is_android or VXWORKS:
             c_arg = arg_utf8
         elif sys.platform.startswith("aix"):
             c_arg = arg.decode('iso-8859-1')
diff --git a/Misc/NEWS.d/next/Tests/2019-03-19-17-39-25.bpo-31904.QxhhRx.rst b/Misc/NEWS.d/next/Tests/2019-03-19-17-39-25.bpo-31904.QxhhRx.rst
new file mode 100644 (file)
index 0000000..9577150
--- /dev/null
@@ -0,0 +1 @@
+Fix test_utf8_mode on VxWorks: Python always use UTF-8 on VxWorks.