Skip to content

Commit f97633d

Browse files
committed
expect an error for float16
That dtype is currently not part of the spec.
1 parent 3b16694 commit f97633d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: xarray_array_testing/tests/test_cubed.py

+4
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ def expected_errors(op, **parameters) -> ContextManager:
7878
return pytest.raises(
7979
TypeError, match="Only real floating-point dtypes are allowed in mean"
8080
)
81+
elif xp.isdtype(var.dtype, np.dtype("float16")):
82+
return pytest.raises(
83+
TypeError, match="Only numeric dtypes are allowed in isnan"
84+
)
8185
elif op in {"var", "std"}:
8286
pytest.skip(reason=f"cubed does not implement {op} yet")
8387
else:

0 commit comments

Comments
 (0)