mirror of
https://github.com/python/cpython.git
synced 2025-09-17 22:20:23 +00:00
raise an ValueError in getvalue() on closed StringIO (closes #12161)
Thanks for Catalin Iacob for the patch.
This commit is contained in:
parent
dbfba1667c
commit
4fa68ab10b
4 changed files with 9 additions and 0 deletions
|
@ -100,6 +100,10 @@ class TestGenericStringIO(unittest.TestCase):
|
|||
self._fp.close()
|
||||
self.assertRaises(ValueError, self._fp.next)
|
||||
|
||||
def test_getvalue(self):
|
||||
self._fp.close()
|
||||
self.assertRaises(ValueError, self._fp.getvalue)
|
||||
|
||||
class TestStringIO(TestGenericStringIO):
|
||||
MODULE = StringIO
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue