]> granicus.if.org Git - python/commitdiff
Try to fix buildbot failure (#9902)
authorAntoine Pitrou <solipsis@pitrou.net>
Mon, 20 Sep 2010 00:12:19 +0000 (00:12 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Mon, 20 Sep 2010 00:12:19 +0000 (00:12 +0000)
Lib/test/test_subprocess.py

index 7341b0b681014873e79910186712d9328c837727..dc6eff64909ea8ca80aba9a4e53123e74e64d62e 100644 (file)
@@ -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)