Kaydet (Commit) 894375a2 authored tarafından Antoine Pitrou's avatar Antoine Pitrou

Fix test_sys under Windows (issue #13119)

üst 5ad514d2
......@@ -523,7 +523,8 @@ class SysModuleTest(unittest.TestCase):
p = subprocess.Popen([sys.executable, "-c", 'print(chr(0xa2))'],
stdout = subprocess.PIPE, env=env)
out = p.communicate()[0].strip()
self.assertEqual(out, "\xa2\n".encode("cp424"))
expected = ("\xa2" + os.linesep).encode("cp424")
self.assertEqual(out, expected)
env["PYTHONIOENCODING"] = "ascii:replace"
p = subprocess.Popen([sys.executable, "-c", 'print(chr(0xa2))'],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment