[Python-checkins] bpo-34201: Tweak test_buffer. (GH-8481)
Serhiy Storchaka
webhook-mailer at python.org
Thu Jul 26 10:34:10 EDT 2018
https://github.com/python/cpython/commit/3b5342caaae6316f3a42af7464bbf6deca62e4ef
commit: 3b5342caaae6316f3a42af7464bbf6deca62e4ef
branch: master
author: Serhiy Storchaka <storchaka at gmail.com>
committer: GitHub <noreply at github.com>
date: 2018年07月26日T17:34:07+03:00
summary:
bpo-34201: Tweak test_buffer. (GH-8481)
files:
M Lib/test/test_buffer.py
diff --git a/Lib/test/test_buffer.py b/Lib/test/test_buffer.py
index 549daa53018b..761ed0a9a9bf 100644
--- a/Lib/test/test_buffer.py
+++ b/Lib/test/test_buffer.py
@@ -765,8 +765,7 @@ def verify(self, result, *, obj,
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 @@ def match(req, flag):
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
More information about the Python-checkins
mailing list