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

Method test_boolean

Lib/test/test_bool.py:242–253  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

240 self.assertIs("xyz".startswith("z"), False)
241
242 def test_boolean(self):
243 self.assertEqual(True & 1, 1)
244 self.assertNotIsInstance(True & 1, bool)
245 self.assertIs(True & True, True)
246
247 self.assertEqual(True | 1, 1)
248 self.assertNotIsInstance(True | 1, bool)
249 self.assertIs(True | True, True)
250
251 self.assertEqual(True ^ 1, 0)
252 self.assertNotIsInstance(True ^ 1, bool)
253 self.assertIs(True ^ True, False)
254
255 def test_fileclosed(self):
256 try:

Callers

nothing calls this directly

Calls 3

assertNotIsInstanceMethod · 0.80
assertEqualMethod · 0.45
assertIsMethod · 0.45

Tested by

no test coverage detected