Update test to the current readline() behaviour.

This commit is contained in:
Walter Dörwald 2005-04-21 21:45:36 +00:00
parent a4eb2d56a4
commit 43148c8413
1 changed files with 2 additions and 0 deletions

View File

@ -165,6 +165,7 @@ class ReadTest(unittest.TestCase):
writer.write(u"foo\r")
self.assertEqual(reader.readline(keepends=False), u"foo")
writer.write(u"\nbar\r")
self.assertEqual(reader.readline(keepends=False), u"")
self.assertEqual(reader.readline(keepends=False), u"bar")
writer.write(u"baz")
self.assertEqual(reader.readline(keepends=False), u"baz")
@ -174,6 +175,7 @@ class ReadTest(unittest.TestCase):
writer.write(u"foo\r")
self.assertEqual(reader.readline(keepends=True), u"foo\r")
writer.write(u"\nbar\r")
self.assertEqual(reader.readline(keepends=True), u"\n")
self.assertEqual(reader.readline(keepends=True), u"bar\r")
writer.write(u"baz")
self.assertEqual(reader.readline(keepends=True), u"baz")