mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
returns in cStringIO.c. Thanks to Andrew Bennetts. This must be a backport candidate.
This commit is contained in:
parent
19e11c86a7
commit
10402a306f
4 changed files with 26 additions and 7 deletions
|
@ -44,6 +44,13 @@ class TestGenericStringIO(unittest.TestCase):
|
|||
f.seek(0)
|
||||
self.assertEqual(f.getvalue(), 'abc')
|
||||
|
||||
def test_writelines_error(self):
|
||||
def errorGen():
|
||||
yield 'a'
|
||||
raise KeyboardInterrupt()
|
||||
f = self.MODULE.StringIO()
|
||||
self.assertRaises(KeyboardInterrupt, f.writelines, errorGen())
|
||||
|
||||
def test_truncate(self):
|
||||
eq = self.assertEqual
|
||||
f = self.MODULE.StringIO()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue