Skip to content

Commit 5c50ff0

Browse files
committed
MAINT: remove explicit dtypes from finfo tests
1 parent e473c80 commit 5c50ff0

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

array_api_tests/test_data_type_functions.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -215,12 +215,7 @@ def test_finfo_dtype(dtype):
215215
try:
216216
out = xp.finfo(dtype)
217217

218-
if dtype == xp.complex64:
219-
assert out.dtype == xp.float32
220-
elif dtype == xp.complex128:
221-
assert out.dtype == xp.float64
222-
else:
223-
assert out.dtype == dtype
218+
assert out.dtype == dh.real_dtype_for(dtype)
224219

225220
# Guard vs. numpy.dtype.__eq__ lax comparison
226221
assert not isinstance(out.dtype, str)

0 commit comments

Comments
 (0)