[Python-checkins] cpython (2.7): Added regression test for issue24581.

serhiy.storchaka python-checkins at python.org
Wed Jul 8 22:03:36 CEST 2015


https://hg.python.org/cpython/rev/cfb84be6c7fc
changeset:   96883:cfb84be6c7fc
branch:      2.7
parent:      96861:4796dec0a7d0
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Wed Jul 08 22:58:55 2015 +0300
summary:
  Added regression test for issue24581.

files:
  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
--- a/Lib/test/test_set.py
+++ b/Lib/test/test_set.py
@@ -1648,6 +1648,17 @@
         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):

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list