diff options
author | Raymond Hettinger <python@rcn.com> | 2015-07-16 06:52:29 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2015-07-16 06:52:29 (GMT) |
commit | d702044bcdb0678cb0ba96235c43ffcaa737214c (patch) | |
tree | a2388922f676be7b49bd511c638849b0b21802cc /Lib/test/test_set.py | |
parent | 3a2290865972e47d68360af4fed6ad9ef4b4434c (diff) | |
parent | a3626bc5bddf9bf43f33060f4ea1a99f25e0c7f1 (diff) | |
download | cpython-d702044bcdb0678cb0ba96235c43ffcaa737214c.zip cpython-d702044bcdb0678cb0ba96235c43ffcaa737214c.tar.gz cpython-d702044bcdb0678cb0ba96235c43ffcaa737214c.tar.bz2 |
merge
Diffstat (limited to 'Lib/test/test_set.py')
-rw-r--r-- | Lib/test/test_set.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Lib/test/test_set.py b/Lib/test/test_set.py index 9f96f87..54de508 100644 --- a/Lib/test/test_set.py +++ b/Lib/test/test_set.py @@ -1742,6 +1742,19 @@ class TestWeirdBugs(unittest.TestCase): s.update(range(100)) list(si) + def test_merge_and_mutate(self): + class X: + def __hash__(self): + return hash(0) + def __eq__(self, o): + other.clear() + return False + + other = set() + other = {X() for i in range(10)} + s = {0} + s.update(other) + # Application tests (based on David Eppstein's graph recipes ==================================== def powerset(U): |