[Python-checkins] r84909 - python/branches/py3k/Lib/test/test_subprocess.py
antoine.pitrou
python-checkins at python.org
Mon Sep 20 00:46:05 CEST 2010
Author: antoine.pitrou
Date: Mon Sep 20 00:46:05 2010
New Revision: 84909
Log:
Try to fix test_subprocess on "x86 debian parallel 3.x" buildbot
Modified:
python/branches/py3k/Lib/test/test_subprocess.py
Modified: python/branches/py3k/Lib/test/test_subprocess.py
==============================================================================
--- python/branches/py3k/Lib/test/test_subprocess.py (original)
+++ python/branches/py3k/Lib/test/test_subprocess.py Mon Sep 20 00:46:05 2010
@@ -886,26 +886,26 @@
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)
More information about the Python-checkins
mailing list