8000 bpo-39943: Remove unused arg from find_nfc_index() by petdance · Pull Request #18950 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-39943: Remove unused arg from find_nfc_index() #18950

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

Closed
wants to merge 9 commits into from
Prev Previous commit
Next Next commit
bpo-39689: Do not test undefined casts to _Bool (GH-18964)
- When casting to _Bool, arrays should only contain zeros or ones.
  • Loading branch information
Stefan Krah authored and petdance committed Mar 13, 2020
commit 9d781c945da8046d3afcccaa2b30bb5c77c9eed1
4 changes: 4 additions & 0 deletions Lib/test/test_buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2754,6 +2754,10 @@ def test_memoryview_cast_1D_ND(self):
# be 1D, at least one format must be 'c', 'b' or 'B'.
for _tshape in gencastshapes():
for char in fmtdict['@']:
# Casts to _Bool are undefined if the source contains values
# other than 0 or 1.
if char == "?":
continue
tfmt = ('', '@')[randrange(2)] + char
tsize = struct.calcsize(tfmt)
n = prod(_tshape) * tsize
Expand Down
0