mirror of
https://github.com/python/cpython.git
synced 2025-09-24 09:23:02 +00:00
Issue #11311: StringIO.readline(0) now returns an empty string as all other
file-like objects.
This commit is contained in:
parent
34fe1b7a3d
commit
8d7d6bcc25
3 changed files with 6 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue