From f4333d0479d6974d142e858522e95cbf8381f016 Mon Sep 17 00:00:00 2001 From: hliu0 Date: Wed, 27 Mar 2019 23:11:12 +0800 Subject: bpo-31904: Fix test_utf8_mode on VxWorks (GH-12428) Python always use UTF-8 on VxWorks. --- Lib/test/test_utf8_mode.py | 4 ++-- Misc/NEWS.d/next/Tests/2019-03-19-17-39-25.bpo-31904.QxhhRx.rst | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 Misc/NEWS.d/next/Tests/2019-03-19-17-39-25.bpo-31904.QxhhRx.rst 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. -- cgit v0.12