mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 13:15:12 +00:00
Fully address i|q|l ambiguity (hopefully).
This commit is contained in:
parent
3f04188baa
commit
38aa697d0d
@ -51,10 +51,10 @@ def test_format_descriptor_format(cpp_name, expected_fmts, np_array_dtype):
|
||||
# py::format_descriptor<> vs np.array:
|
||||
na = np.array([], dtype=np_array_dtype)
|
||||
bi = m.get_buffer_info(na)
|
||||
if fmt == "q":
|
||||
assert bi.format in ["q", "l"]
|
||||
elif fmt == "Q":
|
||||
assert bi.format in ["Q", "L"]
|
||||
if fmt in ("i", "q"):
|
||||
assert bi.format in [fmt, "l"]
|
||||
elif fmt in ("I", "Q"):
|
||||
assert bi.format in [fmt, "L"]
|
||||
else:
|
||||
assert bi.format == fmt
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user