diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-02-13 12:26:58 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-02-13 12:26:58 +0200 |
commit | 8d7d6bcc2519066ba04f3c63d6ae8d2897a94282 (patch) | |
tree | 03622015920e98f626e439d72941ecdb6480b4b8 /Lib/test/test_StringIO.py | |
parent | 34fe1b7a3db61ee1b92f495488b08532b6126450 (diff) | |
download | cpython-git-8d7d6bcc2519066ba04f3c63d6ae8d2897a94282.tar.gz |
Issue #11311: StringIO.readline(0) now returns an empty string as all other
file-like objects.
Diffstat (limited to 'Lib/test/test_StringIO.py')
-rw-r--r-- | Lib/test/test_StringIO.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_StringIO.py b/Lib/test/test_StringIO.py index 84b2b08acb..37a825f14e 100644 --- a/Lib/test/test_StringIO.py +++ b/Lib/test/test_StringIO.py @@ -28,6 +28,8 @@ class TestGenericStringIO(unittest.TestCase): eq = self.assertEqual self.assertRaises(TypeError, self._fp.seek) eq(self._fp.read(10), self._line[:10]) + eq(self._fp.read(0), '') + eq(self._fp.readline(0), '') eq(self._fp.readline(), self._line[10:] + '\n') eq(len(self._fp.readlines(60)), 2) self._fp.seek(0) |