Issue #14203: Remove obsolete support for view==NULL in bytesiobuf_getbuffer()

and array_buffer_getbuf().
This commit is contained in:
Stefan Krah 2015-02-03 21:43:23 +01:00
parent 38c30e6c8e
commit 650c1e818d
6 changed files with 48 additions and 17 deletions

View file

@ -1224,6 +1224,10 @@ class ByteArrayTest(BaseBytesTest, unittest.TestCase):
self.assertRaises(BufferError, delslice)
self.assertEqual(b, orig)
@test.support.cpython_only
def test_obsolete_write_lock(self):
from _testcapi import getbuffer_with_null_view
self.assertRaises(BufferError, getbuffer_with_null_view, bytearray())
class AssortedBytesTest(unittest.TestCase):
#