From 2ca76f693c1b14634d8cb3fd8821654bf9166dae Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Wed, 5 Dec 2007 13:24:28 +0000 Subject: [PATCH] Fixed line separator problem on Windows --- Lib/test/test_io.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py index 36aaf14fc8c..2f222aff3ba 100644 --- a/Lib/test/test_io.py +++ b/Lib/test/test_io.py @@ -528,13 +528,13 @@ class TextIOWrapperTest(unittest.TestCase): t = io.TextIOWrapper(b, encoding="ascii", errors="ignore") t.write("abc\xffdef\n") t.flush() - self.assertEquals(b.getvalue(), b"abcdef\n") + self.assertEquals(b.getvalue(), b"abcdef" + os.linesep.encode()) # (4) replace b = io.BytesIO() t = io.TextIOWrapper(b, encoding="ascii", errors="replace") t.write("abc\xffdef\n") t.flush() - self.assertEquals(b.getvalue(), b"abc?def\n") + self.assertEquals(b.getvalue(), b"abc?def" + os.linesep.encode()) def testNewlinesInput(self): testdata = b"AAA\nBBB\nCCC\rDDD\rEEE\r\nFFF\r\nGGG"