@@ -22,39 +22,35 @@ jobs:
22
22
python -m pip install git+https://github.com/numpy/numpy
23
23
python -m pip install -r requirements.txt
24
24
- name : Run the test suite
25
+ env :
26
+ ARRAY_API_TESTS_MODULE : numpy.array_api
25
27
run : |
26
28
# Mark some known issues as XFAIL
27
- cat << EOF >> conftest.py
29
+ cat << EOF >> xfails.txt
30
+
31
+ # https://github.com/numpy/numpy/issues/18881
32
+ test_creation_functions.py::test_linspace
33
+ # einsum is not yet completed in the spec
34
+ test_signatures.py::test_has_names[einsum]
35
+ # dlpack support is not yet implemented in NumPy
36
+ # See https://github.com/numpy/numpy/pull/19083
37
+ test_signatures.py::test_function_positional_args[__dlpack__]
38
+ test_signatures.py::test_function_positional_args[__dlpack_device__]
39
+ test_signatures.py::test_function_positional_args[from_dlpack]
40
+ test_signatures.py::test_function_keyword_only_args[__dlpack__]
41
+ # Updates to the spec since the last change to numpy.array_api
42
+ # These will fail until NumPy is updated
43
+ test_signatures.py::test_has_names[__index__]
44
+ test_signatures.py::test_has_names[to_device]
45
+ test_signatures.py::test_has_names[mT]
46
+ test_signatures.py::test_has_names[tril]
47
+ test_signatures.py::test_has_names[triu]
48
+ test_signatures.py::test_has_names[matrix_transpose]
49
+ test_signatures.py::test_has_names[permute_dims]
50
+ test_signatures.py::test_function_positional_args[__index__]
51
+ test_signatures.py::test_function_keyword_only_args[prod]
52
+ test_signatures.py::test_function_keyword_only_args[sum]
28
53
29
- names_to_be_xfailed = (
30
- # https://github.com/numpy/numpy/issues/18881
31
- "array_api_tests/test_creation_functions.py::test_linspace",
32
- # einsum is not yet completed in the spec
33
- "array_api_tests/test_signatures.py::test_has_names[einsum]",
34
- # dlpack support is not yet implemented in NumPy. https://github.com/numpy/numpy/pull/19083
35
- "array_api_tests/test_signatures.py::test_function_positional_args[__dlpack__]",
36
- "array_api_tests/test_signatures.py::test_function_positional_args[__dlpack_device__]",
37
- "array_api_tests/test_signatures.py::test_function_positional_args[from_dlpack]",
38
- "array_api_tests/test_signatures.py::test_function_keyword_only_args[__dlpack__]",
39
-
40
- # Updates to the spec since the last change to numpy.array_api.
41
- # These will fail until NumPy is updated.
42
- "array_api_tests/test_signatures.py::test_has_names[__index__]",
43
- "array_api_tests/test_signatures.py::test_has_names[to_device]",
44
- "array_api_tests/test_signatures.py::test_has_names[mT]",
45
- "array_api_tests/test_signatures.py::test_has_names[tril]",
46
- "array_api_tests/test_signatures.py::test_has_names[triu]",
47
- "array_api_tests/test_signatures.py::test_has_names[matrix_transpose]",
48
- "array_api_tests/test_signatures.py::test_has_names[permute_dims]",
49
- "array_api_tests/test_signatures.py::test_function_positional_args[__index__]",
50
- "array_api_tests/test_signatures.py::test_function_keyword_only_args[prod]",
51
- "array_api_tests/test_signatures.py::test_function_keyword_only_args[sum]",
52
- )
53
-
54
- def pytest_collection_modifyitems(config, items):
55
- for item in items:
56
- if item.nodeid in names_to_be_xfailed:
57
- item.add_marker("xfail")
58
54
EOF
59
55
60
- ARRAY_API_TESTS_MODULE=numpy.array_api pytest -v -rxXfE
56
+ pytest -v -rxXfE
0 commit comments