diff options
Diffstat (limited to 'Lib/test/test_cmd_line.py')
| -rw-r--r-- | Lib/test/test_cmd_line.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Lib/test/test_cmd_line.py b/Lib/test/test_cmd_line.py index 7e967b20ab..21511b896c 100644 --- a/Lib/test/test_cmd_line.py +++ b/Lib/test/test_cmd_line.py @@ -159,16 +159,13 @@ class CmdLineTest(unittest.TestCase): env = os.environ.copy() # Use C locale to get ascii for the locale encoding env['LC_ALL'] = 'C' + env['PYTHONCOERCECLOCALE'] = '0' code = ( b'import locale; ' b'print(ascii("' + undecodable + b'"), ' b'locale.getpreferredencoding())') p = subprocess.Popen( - [sys.executable, - # Disable C locale coercion and UTF-8 Mode to not use UTF-8 - "-X", "coerce_c_locale=0", - "-X", "utf8=0", - "-c", code], + [sys.executable, "-c", code], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=env) stdout, stderr = p.communicate() |
