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

Method test_subclasses

Lib/test/test_index.py:45–48  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

43 self.assertEqual(False.__index__(), 0)
44
45 def test_subclasses(self):
46 r = list(range(10))
47 self.assertEqual(r[TrapInt(5):TrapInt(10)], r[5:10])
48 self.assertEqual(slice(TrapInt()).indices(0), (0,0,1))
49
50 def test_error(self):
51 self.o.ind = 'dumb'

Callers

nothing calls this directly

Calls 5

listClass · 0.85
TrapIntClass · 0.85
sliceClass · 0.85
indicesMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected