mirror of
https://github.com/python/cpython.git
synced 2025-08-12 04:49:01 +00:00
[3.12] gh-126341: add release check to __iter__
method of memoryview
(GH-126759) (#126779)
gh-126341: add release check to `__iter__` method of `memoryview` (GH-126759)
(cherry picked from commit a12690ef49
)
Co-authored-by: Ritvik Pasham <ritvikpasham@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: sobolevn <mail@sobolevn.me>
This commit is contained in:
parent
dd21259283
commit
0bdcc84ae9
3 changed files with 4 additions and 0 deletions
|
@ -3906,6 +3906,8 @@ class TestBufferProtocol(unittest.TestCase):
|
|||
self.assertRaises(ValueError, memoryview, m)
|
||||
# memoryview.cast()
|
||||
self.assertRaises(ValueError, m.cast, 'c')
|
||||
# memoryview.__iter__()
|
||||
self.assertRaises(ValueError, m.__iter__)
|
||||
# getbuffer()
|
||||
self.assertRaises(ValueError, ndarray, m)
|
||||
# memoryview.tolist()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue