Commit 2ca76f69 authored by Christian Heimes's avatar Christian Heimes

Fixed line separator problem on Windows

parent 1239ad81
......@@ -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"
......
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