From: Victor Stinner Date: Thu, 14 Oct 2010 10:38:17 +0000 (+0000) Subject: test_subprocess: use C locale to get ascii locale encoding X-Git-Tag: v3.2a4~600 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ebc78d23efca42d491da76151f3c4c839f3c42dc;p=python test_subprocess: use C locale to get ascii locale encoding --- diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index 6eff9e2bf3..d7a157b7e5 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -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)