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

Method test_xor

Lib/test/test_enum.py:3650–3661  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3648 self.assertIs(Open.RO & Open.CE, Open.RO)
3649
3650 def test_xor(self):
3651 Perm = self.Perm
3652 for i in Perm:
3653 for j in Perm:
3654 self.assertEqual((i ^ j).value, i.value ^ j.value)
3655 self.assertIs(type(i ^ j), Perm)
3656 for i in Perm:
3657 self.assertIs(i ^ Perm(0), i)
3658 self.assertIs(Perm(0) ^ i, i)
3659 Open = self.Open
3660 self.assertIs(Open.RO ^ Open.CE, Open.CE)
3661 self.assertIs(Open.CE ^ Open.CE, Open.RO)
3662
3663 def test_bool(self):
3664 Perm = self.Perm

Callers

nothing calls this directly

Calls 3

PermClass · 0.70
assertEqualMethod · 0.45
assertIsMethod · 0.45

Tested by

no test coverage detected