From: hliu0 Date: Wed, 27 Mar 2019 15:11:12 +0000 (+0800) Subject: bpo-31904: Fix test_utf8_mode on VxWorks (GH-12428) X-Git-Tag: v3.8.0a4~320 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f4333d0479d6974d142e858522e95cbf8381f016;p=thirdparty%2FPython%2Fcpython.git bpo-31904: Fix test_utf8_mode on VxWorks (GH-12428) Python always use UTF-8 on VxWorks. --- diff --git a/Lib/test/test_utf8_mode.py b/Lib/test/test_utf8_mode.py index 220ff34a1189..2429b00459be 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 000000000000..95771508619e --- /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.