Issue #6242: Fix deallocator of io.StringIO and io.BytesIO.

This commit is contained in:
Alexandre Vassalotti 2009-07-22 02:24:49 +00:00
parent 4f1f422713
commit fc477048e1
3 changed files with 17 additions and 6 deletions

View file

@ -338,6 +338,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):