MCPcopy Create free account
hub / github.com/python/cpython / test_8420_set_merge

Method test_8420_set_merge

Lib/test/test_set.py:1870–1883  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1868
1869class TestWeirdBugs(unittest.TestCase):
1870 def test_8420_set_merge(self):
1871 # This used to segfault
1872 global be_bad, set2, dict2
1873 be_bad = False
1874 set1 = {bad_eq()}
1875 set2 = {bad_eq() for i in range(75)}
1876 be_bad = True
1877 self.assertRaises(ZeroDivisionError, set1.update, set2)
1878
1879 be_bad = False
1880 set1 = {bad_dict_clear()}
1881 dict2 = {bad_dict_clear(): None}
1882 be_bad = True
1883 set1.symmetric_difference_update(dict2)
1884
1885 def test_iter_and_mutate(self):
1886 # Issue #24581

Callers

nothing calls this directly

Calls 4

bad_eqClass · 0.85
bad_dict_clearClass · 0.85
assertRaisesMethod · 0.45

Tested by

no test coverage detected