Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8a3d1bf

Browse files
committedApr 18, 2023
Fix some tests that fail at collection time with pytorch
1 parent 92c8d45 commit 8a3d1bf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎array_api_tests/test_array_object.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,8 @@ def make_param(method_name: str, dtype: DataType, stype: ScalarType) -> Param:
250250
@pytest.mark.parametrize(
251251
"method_name, dtype, stype",
252252
[make_param("__bool__", xp.bool, bool)]
253-
+ [make_param("__int__", d, int) for d in dh.all_int_dtypes]
254-
+ [make_param("__index__", d, int) for d in dh.all_int_dtypes]
253+
+ [make_param("__int__", d, int) for d in dh._filter_stubs(*dh.all_int_dtypes)]
254+
+ [make_param("__index__", d, int) for d in dh._filter_stubs(*dh.all_int_dtypes)]
255255
+ [make_param("__float__", d, float) for d in dh.float_dtypes],
256256
)
257257
@given(data=st.data())

‎array_api_tests/test_data_type_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def test_finfo(dtype):
164164
# TODO: test values
165165

166166

167-
@pytest.mark.parametrize("dtype", dh.all_int_dtypes, ids=make_dtype_id)
167+
@pytest.mark.parametrize("dtype", dh._filter_stubs(*dh.all_int_dtypes), ids=make_dtype_id)
168168
def test_iinfo(dtype):
169169
out = xp.iinfo(dtype)
170170
f_func = f"[iinfo({dh.dtype_to_name[dtype]})]"

0 commit comments

Comments
 (0)
Please sign in to comment.