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

Method test_keys

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

Source from the content-addressed store, hash-verified

95 self.assertTrue(bool(self.reference))
96
97 def test_keys(self):
98 d = self._empty_mapping()
99 self.assertEqual(list(d.keys()), [])
100 d = self.reference
101 self.assertIn(list(self.inmapping.keys())[0], d.keys())
102 self.assertNotIn(list(self.other.keys())[0], d.keys())
103 self.assertRaises(TypeError, d.keys, None)
104
105 def test_values(self):
106 d = self._empty_mapping()

Callers

nothing calls this directly

Calls 7

_empty_mappingMethod · 0.95
listClass · 0.85
assertInMethod · 0.80
assertNotInMethod · 0.80
assertEqualMethod · 0.45
keysMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected