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

Method test_reversed

Lib/test/test_memoryview.py:420–426  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

418 self.assertIs(L[0], b)
419
420 def test_reversed(self):
421 for tp in self._types:
422 b = tp(self._source)
423 m = self._view(b)
424 aslist = list(reversed(m.tolist()))
425 self.assertEqual(list(reversed(m)), aslist)
426 self.assertEqual(list(reversed(m)), list(m[::-1]))
427
428 def test_toreadonly(self):
429 for tp in self._types:

Callers

nothing calls this directly

Calls 5

listClass · 0.85
reversedFunction · 0.85
_viewMethod · 0.45
tolistMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected