diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-07-08 22:58:55 +0300 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-07-08 22:58:55 +0300 |
commit | a1b1e5f7b827084142d9ea23aee42e883a32c0ad (patch) | |
tree | 0422fa2181446147da9bbef6c47de62776cb7814 /Lib/test/test_set.py | |
parent | 8de92c3a88b61c15bdb5b00934c028ef6ecd4bda (diff) | |
download | cpython-git-a1b1e5f7b827084142d9ea23aee42e883a32c0ad.tar.gz |
Added regression test for issue24581.
Diffstat (limited to 'Lib/test/test_set.py')
-rw-r--r-- | Lib/test/test_set.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_set.py b/Lib/test/test_set.py index dd652023ee..d9ea098b6d 100644 --- a/Lib/test/test_set.py +++ b/Lib/test/test_set.py @@ -1648,6 +1648,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): |