MCPcopy Index your code
hub / github.com/RustPython/RustPython / GetItem

Class GetItem

Lib/test/test_index.py:256–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254
255 def test_getitem(self):
256 class GetItem:
257 def __len__(self):
258 assert False, "__len__ should not be invoked"
259 def __getitem__(self, key):
260 return key
261 x = GetItem()
262 self.assertEqual(x[self.pos], self.pos)
263 self.assertEqual(x[self.neg], self.neg)

Callers 1

test_getitemMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_getitemMethod · 0.68