summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_buffer.py
diff options
context:
space:
mode:
authorRitvik Pasham <ritvikpasham@gmail.com>2024-11-13 11:51:01 (GMT)
committerGitHub <noreply@github.com>2024-11-13 11:51:01 (GMT)
commita12690ef49e8fc8a3af4c5f1757eb3caffb35e03 (patch)
treecbb2fae853e1123469b8441d4e7943faa16fcbe9 /Lib/test/test_buffer.py
parentba088c8f9cf7163b0f28c507cb1343befe21997e (diff)
downloadcpython-a12690ef49e8fc8a3af4c5f1757eb3caffb35e03.zip
cpython-a12690ef49e8fc8a3af4c5f1757eb3caffb35e03.tar.gz
cpython-a12690ef49e8fc8a3af4c5f1757eb3caffb35e03.tar.bz2
gh-126341: add release check to `__iter__` method of `memoryview` (#126759)
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>
Diffstat (limited to 'Lib/test/test_buffer.py')
-rw-r--r--Lib/test/test_buffer.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_buffer.py b/Lib/test/test_buffer.py
index ae938d1..cb38a69 100644
--- a/Lib/test/test_buffer.py
+++ b/Lib/test/test_buffer.py
@@ -3910,6 +3910,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()