mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Issue 6329: Fix iteration for memoryviews.
This commit is contained in:
parent
b7706b58fa
commit
159eac92c5
3 changed files with 60 additions and 32 deletions
|
@ -48,6 +48,12 @@ class AbstractMemoryTests:
|
|||
for tp in self._types:
|
||||
self.check_getitem_with_type(tp)
|
||||
|
||||
def test_iter(self):
|
||||
for tp in self._types:
|
||||
b = tp(self._source)
|
||||
m = self._view(b)
|
||||
self.assertEqual(list(m), [m[i] for i in range(len(m))])
|
||||
|
||||
def test_setitem_readonly(self):
|
||||
if not self.ro_type:
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue