Commit 3b5342ca authored by Serhiy Storchaka's avatar Serhiy Storchaka Committed by GitHub

bpo-34201: Tweak test_buffer. (GH-8481)

parent d145775b
......@@ -765,8 +765,7 @@ class TestBufferProtocol(unittest.TestCase):
itemsize, fmt, readonly,
ndim, shape, strides,
lst, sliced=False, cast=False):
# Verify buffer contents against expected values. Default values
# are deliberately initialized to invalid types.
# Verify buffer contents against expected values.
if shape:
expected_len = prod(shape)*itemsize
else:
......@@ -978,7 +977,7 @@ class TestBufferProtocol(unittest.TestCase):
lst = nd.tolist()
# The consumer may have requested default values or a NULL format.
ro = not match(req, PyBUF_WRITABLE) and ex.readonly
ro = False if match(req, PyBUF_WRITABLE) else ex.readonly
fmt = ex.format
itemsize = ex.itemsize
ndim = ex.ndim
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment