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

Method test_bool

Lib/test/mapping_tests.py:318–323  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

316 self.assertEqual(self.type2test(x=1, y=2), {"x": 1, "y": 2})
317
318 def test_bool(self):
319 BasicTestMappingProtocol.test_bool(self)
320 self.assertTrue(not self._empty_mapping())
321 self.assertTrue(self._full_mapping({"x": "y"}))
322 self.assertTrue(bool(self._empty_mapping()) is False)
323 self.assertTrue(bool(self._full_mapping({"x": "y"})) is True)
324
325 def test_keys(self):
326 BasicTestMappingProtocol.test_keys(self)

Callers

nothing calls this directly

Calls 3

assertTrueMethod · 0.80
_empty_mappingMethod · 0.45
_full_mappingMethod · 0.45

Tested by

no test coverage detected