Update test to the current readline() behaviour.
This commit is contained in:
parent
a4eb2d56a4
commit
43148c8413
|
@ -165,6 +165,7 @@ class ReadTest(unittest.TestCase):
|
||||||
writer.write(u"foo\r")
|
writer.write(u"foo\r")
|
||||||
self.assertEqual(reader.readline(keepends=False), u"foo")
|
self.assertEqual(reader.readline(keepends=False), u"foo")
|
||||||
writer.write(u"\nbar\r")
|
writer.write(u"\nbar\r")
|
||||||
|
self.assertEqual(reader.readline(keepends=False), u"")
|
||||||
self.assertEqual(reader.readline(keepends=False), u"bar")
|
self.assertEqual(reader.readline(keepends=False), u"bar")
|
||||||
writer.write(u"baz")
|
writer.write(u"baz")
|
||||||
self.assertEqual(reader.readline(keepends=False), u"baz")
|
self.assertEqual(reader.readline(keepends=False), u"baz")
|
||||||
|
@ -174,6 +175,7 @@ class ReadTest(unittest.TestCase):
|
||||||
writer.write(u"foo\r")
|
writer.write(u"foo\r")
|
||||||
self.assertEqual(reader.readline(keepends=True), u"foo\r")
|
self.assertEqual(reader.readline(keepends=True), u"foo\r")
|
||||||
writer.write(u"\nbar\r")
|
writer.write(u"\nbar\r")
|
||||||
|
self.assertEqual(reader.readline(keepends=True), u"\n")
|
||||||
self.assertEqual(reader.readline(keepends=True), u"bar\r")
|
self.assertEqual(reader.readline(keepends=True), u"bar\r")
|
||||||
writer.write(u"baz")
|
writer.write(u"baz")
|
||||||
self.assertEqual(reader.readline(keepends=True), u"baz")
|
self.assertEqual(reader.readline(keepends=True), u"baz")
|
||||||
|
|
Loading…
Reference in New Issue