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

Method check_bitop_identities_3

Lib/test/test_long.py:272–279  ·  view source on GitHub ↗
(self, x, y, z)

Source from the content-addressed store, hash-verified

270 eq(x ^ y, (x | y) & (~x | ~y))
271
272 def check_bitop_identities_3(self, x, y, z):
273 eq = self.assertEqual
274 with self.subTest(x=x, y=y, z=z):
275 eq((x & y) & z, x & (y & z))
276 eq((x | y) | z, x | (y | z))
277 eq((x ^ y) ^ z, x ^ (y ^ z))
278 eq(x & (y | z), (x & y) | (x & z))
279 eq(x | (y & z), (x | y) & (x | z))
280
281 def test_bitop_identities(self):
282 for x in special:

Callers 1

test_bitop_identitiesMethod · 0.95

Calls 2

eqFunction · 0.85
subTestMethod · 0.45

Tested by

no test coverage detected