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

Method test_getitem

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

Source from the content-addressed store, hash-verified

119 self.assertEqual(len(d), 0)
120
121 def test_getitem(self):
122 d = self.reference
123 self.assertEqual(d[list(self.inmapping.keys())[0]],
124 list(self.inmapping.values())[0])
125
126 self.assertRaises(TypeError, d.__getitem__)
127
128 # no test_fromkeys or test_copy as both os.environ and selves don't support it
129

Callers

nothing calls this directly

Calls 5

listClass · 0.85
assertEqualMethod · 0.45
keysMethod · 0.45
valuesMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected