mirror of
https://github.com/python/cpython.git
synced 2025-07-29 14:15:07 +00:00
Manual py3k backport: [svn r74155] Issue #6242: Fix deallocator of io.StringIO and io.BytesIO
This commit is contained in:
parent
5f029ce664
commit
f98a267be3
3 changed files with 17 additions and 6 deletions
|
@ -345,6 +345,13 @@ class MemoryTestMixin:
|
|||
self.assertEqual(test1(), buf)
|
||||
self.assertEqual(test2(), buf)
|
||||
|
||||
def test_instance_dict_leak(self):
|
||||
# Test case for issue #6242.
|
||||
# This will be caught by regrtest.py -R if this leak.
|
||||
for _ in range(100):
|
||||
memio = self.ioclass()
|
||||
memio.foo = 1
|
||||
|
||||
|
||||
class PyBytesIOTest(MemoryTestMixin, MemorySeekTestMixin, unittest.TestCase):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue