MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_xor

Method test_xor

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

Source from the content-addressed store, hash-verified

195 self.assertEqual(self.thetype('abcba').symmetric_difference(C('ef')), set('abcef'))
196
197 def test_xor(self):
198 i = self.s.symmetric_difference(self.otherword)
199 self.assertEqual(self.s ^ set(self.otherword), i)
200 self.assertEqual(self.s ^ frozenset(self.otherword), i)
201 try:
202 self.s ^ self.otherword
203 except TypeError:
204 pass
205 else:
206 self.fail("s^t did not screen-out general iterables")
207
208 def test_equality(self):
209 self.assertEqual(self.s, set(self.word))

Callers

nothing calls this directly

Calls 4

setFunction · 0.85
symmetric_differenceMethod · 0.45
assertEqualMethod · 0.45
failMethod · 0.45

Tested by

no test coverage detected