summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-07-08 19:58:55 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-07-08 19:58:55 (GMT)
commitaf320b389bba5221870553e70eaefee3bdf860e5 (patch)
tree72c23dde067ecb047c65d9d74be7cc3d728250a3 /Lib
parente36402a83041007b34a111fb20ede88abf4cb223 (diff)
downloadcpython-af320b389bba5221870553e70eaefee3bdf860e5.zip
cpython-af320b389bba5221870553e70eaefee3bdf860e5.tar.gz
cpython-af320b389bba5221870553e70eaefee3bdf860e5.tar.bz2
Added regression test for issue24581.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_set.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_set.py b/Lib/test/test_set.py
index 65e4243..f084ebe 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):