diff options
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_memoryio.py | 7 |
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): |