Commit ebc78d23 authored by Victor Stinner's avatar Victor Stinner

test_subprocess: use C locale to get ascii locale encoding

parent f5247e35
......@@ -885,6 +885,8 @@ class POSIXProcessTestCase(BaseTestCase):
script = "import os; print(ascii(os.getenv(%s)))" % repr(key)
env = os.environ.copy()
env[key] = value
# Use C locale to get ascii for the locale encoding
env['LC_ALL'] = 'C'
stdout = subprocess.check_output(
[sys.executable, "-c", script],
env=env)
......@@ -897,6 +899,8 @@ class POSIXProcessTestCase(BaseTestCase):
script = "import os; print(ascii(os.getenvb(%s)))" % repr(key)
env = os.environ.copy()
env[key] = value
# Use C locale to get ascii for the locale encoding
env['LC_ALL'] = 'C'
stdout = subprocess.check_output(
[sys.executable, "-c", script],
env=env)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment