mirror of
https://github.com/pybind/pybind11.git
synced 2025-02-16 21:57:55 +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:
|
# py::format_descriptor<> vs np.array:
|
||||||
na = np.array([], dtype=np_array_dtype)
|
na = np.array([], dtype=np_array_dtype)
|
||||||
bi = m.get_buffer_info(na)
|
bi = m.get_buffer_info(na)
|
||||||
if fmt == "q":
|
if fmt in ("i", "q"):
|
||||||
assert bi.format in ["q", "l"]
|
assert bi.format in [fmt, "l"]
|
||||||
elif fmt == "Q":
|
elif fmt in ("I", "Q"):
|
||||||
assert bi.format in ["Q", "L"]
|
assert bi.format in [fmt, "L"]
|
||||||
else:
|
else:
|
||||||
assert bi.format == fmt
|
assert bi.format == fmt
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user