bpo-31904: Fix test_utf8_mode on VxWorks (GH-12428)
Python always use UTF-8 on VxWorks.
This commit is contained in:
parent
34ef64fe59
commit
f4333d0479
|
@ -12,7 +12,7 @@ from test.support.script_helper import assert_python_ok, assert_python_failure
|
||||||
|
|
||||||
MS_WINDOWS = (sys.platform == 'win32')
|
MS_WINDOWS = (sys.platform == 'win32')
|
||||||
POSIX_LOCALES = ('C', 'POSIX')
|
POSIX_LOCALES = ('C', 'POSIX')
|
||||||
|
VXWORKS = (sys.platform == "vxworks")
|
||||||
|
|
||||||
class UTF8ModeTests(unittest.TestCase):
|
class UTF8ModeTests(unittest.TestCase):
|
||||||
DEFAULT_ENV = {
|
DEFAULT_ENV = {
|
||||||
|
@ -225,7 +225,7 @@ class UTF8ModeTests(unittest.TestCase):
|
||||||
with self.subTest(LC_ALL=loc):
|
with self.subTest(LC_ALL=loc):
|
||||||
check('utf8', [arg_utf8], 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
|
c_arg = arg_utf8
|
||||||
elif sys.platform.startswith("aix"):
|
elif sys.platform.startswith("aix"):
|
||||||
c_arg = arg.decode('iso-8859-1')
|
c_arg = arg.decode('iso-8859-1')
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Fix test_utf8_mode on VxWorks: Python always use UTF-8 on VxWorks.
|
Loading…
Reference in New Issue