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

Method test_keys

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

Source from the content-addressed store, hash-verified

323 self.assertTrue(bool(self._full_mapping({"x": "y"})) is True)
324
325 def test_keys(self):
326 BasicTestMappingProtocol.test_keys(self)
327 d = self._empty_mapping()
328 self.assertEqual(list(d.keys()), [])
329 d = self._full_mapping({'a': 1, 'b': 2})
330 k = d.keys()
331 self.assertIn('a', k)
332 self.assertIn('b', k)
333 self.assertNotIn('c', k)
334
335 def test_values(self):
336 BasicTestMappingProtocol.test_values(self)

Callers

nothing calls this directly

Calls 7

listClass · 0.85
assertInMethod · 0.80
assertNotInMethod · 0.80
_empty_mappingMethod · 0.45
assertEqualMethod · 0.45
keysMethod · 0.45
_full_mappingMethod · 0.45

Tested by

no test coverage detected