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

Method test_slice

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

Source from the content-addressed store, hash-verified

23 self.assertEqual(operator.index(self.n), 2)
24
25 def test_slice(self):
26 self.o.ind = 1
27 self.n.ind = 2
28 slc = slice(self.o, self.o, self.o)
29 check_slc = slice(1, 1, 1)
30 self.assertEqual(slc.indices(self.o), check_slc.indices(1))
31 slc = slice(self.n, self.n, self.n)
32 check_slc = slice(2, 2, 2)
33 self.assertEqual(slc.indices(self.n), check_slc.indices(2))
34
35 def test_wrappers(self):
36 self.o.ind = 4

Callers

nothing calls this directly

Calls 3

sliceClass · 0.85
indicesMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected