summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_codecs.py
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2005-04-21 21:45:36 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2005-04-21 21:45:36 (GMT)
commit43148c84136697b56cdd9327a64ac3225fe48651 (patch)
tree57a4ae9ea520457cfd04b4bb66b47ff0b97c058d /Lib/test/test_codecs.py
parenta4eb2d56a4cddd41fb649628107d51902b53f00a (diff)
downloadcpython-43148c84136697b56cdd9327a64ac3225fe48651.zip
cpython-43148c84136697b56cdd9327a64ac3225fe48651.tar.gz
cpython-43148c84136697b56cdd9327a64ac3225fe48651.tar.bz2
Update test to the current readline() behaviour.
Diffstat (limited to 'Lib/test/test_codecs.py')
-rw-r--r--Lib/test/test_codecs.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py
index 692e9b5..4154ad2 100644
--- a/Lib/test/test_codecs.py
+++ b/Lib/test/test_codecs.py
@@ -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")