summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-07-08 20:02:18 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-07-08 20:02:18 (GMT)
commit9e7a0468ef12dc68a7efc397511ef06407aa835c (patch)
treef02e1e33fca236a3065dc8cac2b0015971e04f14 /Lib/test
parentb257eed0431d1a74b064cb357b0be9ed45636b34 (diff)
parentaf320b389bba5221870553e70eaefee3bdf860e5 (diff)
downloadcpython-9e7a0468ef12dc68a7efc397511ef06407aa835c.zip
cpython-9e7a0468ef12dc68a7efc397511ef06407aa835c.tar.gz
cpython-9e7a0468ef12dc68a7efc397511ef06407aa835c.tar.bz2
Added regression test for issue24581.
Diffstat (limited to 'Lib/test')
-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 c25386f..9f96f87 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):