From fbb1c5ee068d209e33f6e15ecb4821d5d8b107fa Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Wed, 30 Mar 2016 20:40:02 +0300 Subject: Issue #26494: Fixed crash on iterating exhausting iterators. Affected classes are generic sequence iterators, iterators of str, bytes, bytearray, list, tuple, set, frozenset, dict, OrderedDict, corresponding views and os.scandir() iterator. --- Lib/test/test_set.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Lib/test/test_set.py') diff --git a/Lib/test/test_set.py b/Lib/test/test_set.py index 54de508a83..0b99dfc639 100644 --- a/Lib/test/test_set.py +++ b/Lib/test/test_set.py @@ -362,6 +362,9 @@ class TestJointOps: gc.collect() self.assertTrue(ref() is None, "Cycle was not collected") + def test_free_after_iterating(self): + support.check_free_after_iterating(self, iter, self.thetype) + class TestSet(TestJointOps, unittest.TestCase): thetype = set basetype = set -- cgit v1.2.1