diff options
author | Christian Heimes <christian@cheimes.de> | 2007-12-05 13:24:28 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2007-12-05 13:24:28 (GMT) |
commit | 2ca76f693c1b14634d8cb3fd8821654bf9166dae (patch) | |
tree | 50b6f30fcda47ae0792d5d8d27d6979f330ad46e /Lib/test | |
parent | 1239ad81e023db1b6c9f7510b870850428f3b97b (diff) | |
download | cpython-2ca76f693c1b14634d8cb3fd8821654bf9166dae.zip cpython-2ca76f693c1b14634d8cb3fd8821654bf9166dae.tar.gz cpython-2ca76f693c1b14634d8cb3fd8821654bf9166dae.tar.bz2 |
Fixed line separator problem on Windows
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_io.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py index 36aaf14..2f222af 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" |