Issue #10181: The decision was to raise a buffer error in memory_exit()
if the view has exported buffers. Make this official by uncommenting a test case.
This commit is contained in:
parent
4e99a315b7
commit
fcbb4169b9
|
@ -3484,11 +3484,12 @@ class TestBufferProtocol(unittest.TestCase):
|
||||||
self.assertEqual(m3[2], ord(b'3'))
|
self.assertEqual(m3[2], ord(b'3'))
|
||||||
del m1, m2, m3
|
del m1, m2, m3
|
||||||
|
|
||||||
# XXX If m1 has exports, raise BufferError.
|
# memoryview.release() fails if the view has exported buffers.
|
||||||
# x = bytearray(b'123')
|
x = bytearray(b'123')
|
||||||
# with memoryview(x) as m1:
|
with self.assertRaises(BufferError):
|
||||||
# ex = ndarray(m1)
|
with memoryview(x) as m:
|
||||||
# m1[0] == ord(b'1')
|
ex = ndarray(m)
|
||||||
|
m[0] == ord(b'1')
|
||||||
|
|
||||||
def test_memoryview_redirect(self):
|
def test_memoryview_redirect(self):
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue