summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_memoryio.py
diff options
context:
space:
mode:
authorAlexandre Vassalotti <alexandre@peadrop.com>2009-07-22 02:24:49 (GMT)
committerAlexandre Vassalotti <alexandre@peadrop.com>2009-07-22 02:24:49 (GMT)
commitfc477048e1dee78a1b4376584cac052be1b4752d (patch)
tree3018e0c1dc2d6896d3fd27d44f9ae63de3e27d61 /Lib/test/test_memoryio.py
parent4f1f422713358767de04642724ea4f96c6404f92 (diff)
downloadcpython-fc477048e1dee78a1b4376584cac052be1b4752d.zip
cpython-fc477048e1dee78a1b4376584cac052be1b4752d.tar.gz
cpython-fc477048e1dee78a1b4376584cac052be1b4752d.tar.bz2
Issue #6242: Fix deallocator of io.StringIO and io.BytesIO.
Diffstat (limited to 'Lib/test/test_memoryio.py')
-rw-r--r--Lib/test/test_memoryio.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_memoryio.py b/Lib/test/test_memoryio.py
index c98c307..0b25283 100644
--- a/Lib/test/test_memoryio.py
+++ b/Lib/test/test_memoryio.py
@@ -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):