Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-34201: Tweak test_buffer. #8481

Merged
merged 1 commit into from
Jul 26, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Lib/test/test_buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down