MCPcopy Index your code
hub / github.com/python/cpython / test_symmetric_difference_update

Method test_symmetric_difference_update

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

Source from the content-addressed store, hash-verified

568 self.assertNotIn(c, self.s)
569
570 def test_symmetric_difference_update(self):
571 retval = self.s.symmetric_difference_update(self.otherword)
572 self.assertEqual(retval, None)
573 for c in (self.word + self.otherword):
574 if (c in self.word) ^ (c in self.otherword):
575 self.assertIn(c, self.s)
576 else:
577 self.assertNotIn(c, self.s)
578 self.assertRaises(PassThru, self.s.symmetric_difference_update, check_pass_thru())
579 self.assertRaises(TypeError, self.s.symmetric_difference_update, [[]])
580 for p, q in (('cdc', 'abd'), ('efgfe', 'abcefg'), ('ccb', 'a'), ('ef', 'abcef')):
581 for C in set, frozenset, dict.fromkeys, str, list, tuple:
582 s = self.thetype('abcba')
583 self.assertEqual(s.symmetric_difference_update(C(p)), None)
584 self.assertEqual(s, set(q))
585
586 def test_ixor(self):
587 self.s ^= set(self.otherword)

Callers

nothing calls this directly

Calls 8

check_pass_thruFunction · 0.85
setFunction · 0.85
assertInMethod · 0.80
assertNotInMethod · 0.80
CClass · 0.70
assertEqualMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected