Skip to content

Commit 00c56c9

Browse files
committed
Add basic check that the dtype attribute exists in test_iinfo and test_finfo
1 parent 5738b59 commit 00c56c9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

array_api_tests/test_data_type_functions.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ def test_finfo(dtype_name):
162162
assert isinstance(
163163
value, stype
164164
), f"type(out.{attr})={type(value)!r}, but should be {stype.__name__} {f_func}"
165+
assert hasattr(out, "dtype"), f"out has no attribute 'dtype' {f_func}"
165166
# TODO: test values
166167

167168

@@ -179,6 +180,7 @@ def test_iinfo(dtype_name):
179180
assert isinstance(
180181
value, int
181182
), f"type(out.{attr})={type(value)!r}, but should be int {f_func}"
183+
assert hasattr(out, "dtype"), f"out has no attribute 'dtype' {f_func}"
182184
# TODO: test values
183185

184186

0 commit comments

Comments
 (0)