summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-09-19 22:46:05 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-09-19 22:46:05 (GMT)
commitfb8db8f6353202f7a821ed3ec1f39c96ef672779 (patch)
treef20e906f648a4adb32d3be2ee978284ec155812d /Lib
parentbc2eff31128e9d6b2e0c5ce788acf1633bcc0ccb (diff)
downloadcpython-fb8db8f6353202f7a821ed3ec1f39c96ef672779.zip
cpython-fb8db8f6353202f7a821ed3ec1f39c96ef672779.tar.gz
cpython-fb8db8f6353202f7a821ed3ec1f39c96ef672779.tar.bz2
Try to fix test_subprocess on "x86 debian parallel 3.x" buildbot
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_subprocess.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index da92d59..5cc8903 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -886,26 +886,26 @@ class POSIXProcessTestCase(BaseTestCase):
def test_undecodable_env(self):
for key, value in (('test', 'abc\uDCFF'), ('test\uDCFF', '42')):
# test str with surrogates
- script = "import os; print(repr(os.getenv(%s)))" % repr(key)
+ script = "import os; print(ascii(os.getenv(%s)))" % repr(key)
env = os.environ.copy()
env[key] = value
stdout = subprocess.check_output(
[sys.executable, "-c", script],
env=env)
stdout = stdout.rstrip(b'\n\r')
- self.assertEquals(stdout.decode('ascii'), repr(value))
+ self.assertEquals(stdout.decode('ascii'), ascii(value))
# test bytes
key = key.encode("ascii", "surrogateescape")
value = value.encode("ascii", "surrogateescape")
- script = "import os; print(repr(os.getenvb(%s)))" % repr(key)
+ script = "import os; print(ascii(os.getenvb(%s)))" % repr(key)
env = os.environ.copy()
env[key] = value
stdout = subprocess.check_output(
[sys.executable, "-c", script],
env=env)
stdout = stdout.rstrip(b'\n\r')
- self.assertEquals(stdout.decode('ascii'), repr(value))
+ self.assertEquals(stdout.decode('ascii'), ascii(value))
def test_bytes_program(self):
abs_program = os.fsencode(sys.executable)