diff options
author | hliu0 <hongchang.liu@windriver.com> | 2019-03-27 15:11:12 (GMT) |
---|---|---|
committer | Victor Stinner <vstinner@redhat.com> | 2019-03-27 15:11:12 (GMT) |
commit | f4333d0479d6974d142e858522e95cbf8381f016 (patch) | |
tree | 8b9113338dc276ea1b712b8ab80f51880229d674 | |
parent | 34ef64fe5947bd7e1b075c785fc1125c4e600cd4 (diff) | |
download | cpython-f4333d0479d6974d142e858522e95cbf8381f016.zip cpython-f4333d0479d6974d142e858522e95cbf8381f016.tar.gz cpython-f4333d0479d6974d142e858522e95cbf8381f016.tar.bz2 |
bpo-31904: Fix test_utf8_mode on VxWorks (GH-12428)
Python always use UTF-8 on VxWorks.
-rw-r--r-- | Lib/test/test_utf8_mode.py | 4 | ||||
-rw-r--r-- | Misc/NEWS.d/next/Tests/2019-03-19-17-39-25.bpo-31904.QxhhRx.rst | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_utf8_mode.py b/Lib/test/test_utf8_mode.py index 220ff34..2429b00 100644 --- a/Lib/test/test_utf8_mode.py +++ b/Lib/test/test_utf8_mode.py @@ -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 index 0000000..9577150 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2019-03-19-17-39-25.bpo-31904.QxhhRx.rst @@ -0,0 +1 @@ +Fix test_utf8_mode on VxWorks: Python always use UTF-8 on VxWorks. |