This commit is contained in:
Raymond Hettinger 2015-07-15 23:52:29 -07:00
commit d702044bcd
3 changed files with 17 additions and 1 deletions

View file

@ -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):