Skip to content

Commit 87cd96d

Browse files
committed
Skip instead of xfail on workflow
1 parent 9deff00 commit 87cd96d

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

.github/workflows/numpy.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ jobs:
2525
env:
2626
ARRAY_API_TESTS_MODULE: numpy.array_api
2727
run: |
28-
# Mark some known issues as XFAIL
29-
cat << EOF >> xfails.txt
28+
# Skip test cases with known issues
29+
cat << EOF >> skips.txt
3030
3131
# copy not implemented
3232
array_api_tests/test_creation_functions.py::test_asarray_arrays

conftest.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,14 @@ def xp_has_ext(ext: str) -> bool:
7171
return False
7272

7373

74-
xfail_ids = []
75-
xfails_path = Path(__file__).parent / "xfails.txt"
76-
if xfails_path.exists():
77-
with open(xfails_path) as f:
74+
skip_ids = []
75+
skips_path = Path(__file__).parent / "skips.txt"
76+
if skips_path.exists():
77+
with open(skips_path) as f:
7878
for line in f:
7979
if line.startswith("array_api_tests"):
8080
id_ = line.strip("\n")
81-
xfail_ids.append(id_)
81+
skip_ids.append(id_)
8282

8383

8484
def pytest_collection_modifyitems(config, items):
@@ -96,10 +96,10 @@ def pytest_collection_modifyitems(config, items):
9696
)
9797
elif not xp_has_ext(ext):
9898
item.add_marker(mark.skip(reason=f"{ext} not found in array module"))
99-
# xfail if specified in xfails.txt
100-
for id_ in xfail_ids:
99+
# skip if specified in skips.txt
100+
for id_ in skip_ids:
101101
if item.nodeid.startswith(id_):
102-
item.add_marker(mark.xfail(reason="xfails.txt"))
102+
item.add_marker(mark.skip(reason="skips.txt"))
103103
break
104104
# skip if test not appropiate for CI
105105
if ci:

0 commit comments

Comments
 (0)