summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-10-14 10:38:17 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2010-10-14 10:38:17 (GMT)
commitebc78d23efca42d491da76151f3c4c839f3c42dc (patch)
treeb1ec3b428f99bd5fc849c820c2044d7b2cf5631a /Lib
parentf5247e35c186e4325c95e28554412f040aa5114f (diff)
downloadcpython-ebc78d23efca42d491da76151f3c4c839f3c42dc.zip
cpython-ebc78d23efca42d491da76151f3c4c839f3c42dc.tar.gz
cpython-ebc78d23efca42d491da76151f3c4c839f3c42dc.tar.bz2
test_subprocess: use C locale to get ascii locale encoding
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_subprocess.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index 6eff9e2..d7a157b 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)