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

@ -1041,6 +1041,11 @@ def test_initialize_with_unicode(self):
a = array.array(self.typecode, "foo")
a = array.array(self.typecode, array.array('u', 'foo'))
@support.cpython_only
def test_obsolete_write_lock(self):
from _testcapi import getbuffer_with_null_view
a = array.array('B', b"")
self.assertRaises(BufferError, getbuffer_with_null_view, a)
class StringTest(BaseTest):