From: Serhiy Storchaka Date: Wed, 8 Jul 2015 19:58:55 +0000 (+0300) Subject: Added regression test for issue24581. X-Git-Tag: v3.5.0b4~62^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=af320b389bba5221870553e70eaefee3bdf860e5;p=thirdparty%2FPython%2Fcpython.git Added regression test for issue24581. --- diff --git a/Lib/test/test_set.py b/Lib/test/test_set.py index 65e424307faf..f084ebeaddf6 100644 --- a/Lib/test/test_set.py +++ b/Lib/test/test_set.py @@ -1731,6 +1731,17 @@ class TestWeirdBugs(unittest.TestCase): be_bad = True set1.symmetric_difference_update(dict2) + def test_iter_and_mutate(self): + # Issue #24581 + s = set(range(100)) + s.clear() + s.update(range(100)) + si = iter(s) + s.clear() + a = list(range(100)) + s.update(range(100)) + list(si) + # Application tests (based on David Eppstein's graph recipes ==================================== def powerset(U):