mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
parent
dff9e2535f
commit
a0f169cde8
3 changed files with 14 additions and 1 deletions
|
@ -352,6 +352,15 @@ class AbstractMemoryTests:
|
|||
self.assertIs(wr(), None)
|
||||
self.assertIs(L[0], b)
|
||||
|
||||
def test_reversed(self):
|
||||
for tp in self._types:
|
||||
b = tp(self._source)
|
||||
m = self._view(b)
|
||||
aslist = list(reversed(m.tolist()))
|
||||
self.assertEqual(list(reversed(m)), aslist)
|
||||
self.assertEqual(list(reversed(m)), list(m[::-1]))
|
||||
|
||||
|
||||
# Variations on source objects for the buffer: bytes-like objects, then arrays
|
||||
# with itemsize > 1.
|
||||
# NOTE: support for multi-dimensional objects is unimplemented.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue