summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_subprocess.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-09-20 00:12:19 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-09-20 00:12:19 (GMT)
commit84e751a4429637418970eebc6300d8ac0603da8a (patch)
treebcb9d17fd5f338efc5734fb02bac2f132a3fa3d4 /Lib/test/test_subprocess.py
parent7c08744f523e0c054156ea06eb97d09a8caae314 (diff)
downloadcpython-84e751a4429637418970eebc6300d8ac0603da8a.zip
cpython-84e751a4429637418970eebc6300d8ac0603da8a.tar.gz
cpython-84e751a4429637418970eebc6300d8ac0603da8a.tar.bz2
Try to fix buildbot failure (#9902)
Diffstat (limited to 'Lib/test/test_subprocess.py')
-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 7341b0b..dc6eff6 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -891,6 +891,10 @@ class POSIXProcessTestCase(BaseTestCase):
script = "import os; print(ascii(os.getenv(%s)))" % repr(key)
env = os.environ.copy()
env[key] = value
+ # Force surrogate-escaping of \xFF in the child process;
+ # otherwise it can be decoded as-is if the default locale
+ # is latin-1.
+ env['PYTHONFSENCODING'] = 'ascii'
stdout = subprocess.check_output(
[sys.executable, "-c", script],
env=env)