From 894375a2fdb872c36810bd4d010dcb2cbd8f8c9c Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Sun, 5 Aug 2012 00:15:06 +0200 Subject: [PATCH] Fix test_sys under Windows (issue #13119) --- Lib/test/test_sys.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index b055fccbcb..a52767a110 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -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))'], -- 2.40.0