Skip to content

Add supportfor multiple skip/xfail files - #454

Merged
ev-br merged 1 commit into
data-apis:masterfrom
betatim:multi-file-xfails
Aug 14, 2026
Merged

Add supportfor multiple skip/xfail files#454
ev-br merged 1 commit into
data-apis:masterfrom
betatim:multi-file-xfails

Conversation

@betatim

@betatim betatim commented Aug 13, 2026

Copy link
Copy Markdown
Member

This allows you to specify several files which are combined. For examplea general file plus a platform specific one.

You can now do something like pytest --skips-file skips-general.txt --skips-file skips-macos.txt array_api_tests/.

There was a difference in line handling between skips and xfails. I unified them to how xfails handles things. The skips lines were only taken if line.startswith("array_api_tests"). And all other lines were ignored. Now all lines that aren't blank or start with a # are kept. They still have to resolve to valid test IDs, so I think the end result will be the same.

This came out of a discussion at data-apis/array-api-strict#240 (comment)

This allows you to specify several files which are combined. For
examplea general file plus a platform specific one.
@betatim
betatim requested a review from ev-br August 14, 2026 06:20
@betatim

betatim commented Aug 14, 2026

Copy link
Copy Markdown
Member Author

I'm not sure who should/can review this, so I requested a review from @ev-br because GitHub suggested it.

How do people generally decide on merging (or not) things in this repo? Wait for one review? One thumbs up from Lucas and then self-merge?

@ev-br

ev-br commented Aug 14, 2026

Copy link
Copy Markdown
Member

Test-driving this PR locally:

  1. The following incantation fails on master and passes in this PR. This is the expected correct behavior: the test is xfailed in the numpy-xfails.txt, so in master two xfail files are not understood, and in this PR they are.
$ ARRAY_API_TESTS_MODULE=numpy pytest array_api_tests/test_data_type_functions.py::test_finfo[float32]  --skips-file=../array-api-compat/numpy-xfails.txt --skips-file=../array-api-strict/array-api-tests-xfails.txt  -v
  1. Running with no skips skill works: the following incantation fails as expected
$ ARRAY_API_TESTS_MODULE=numpy pytest array_api_tests/test_data_type_functions.py::test_finfo[float32] 

The code change LGTM, thank you @betatim

@ev-br
ev-br merged commit 05b12af into data-apis:master Aug 14, 2026
5 checks passed
@ev-br

ev-br commented Aug 14, 2026

Copy link
Copy Markdown
Member

How do people generally decide on merging (or not) things in this repo? Wait for one review? One thumbs up from Lucas and then self-merge?

For the last year or so, it was mostly me self-merging at ad hoc times.
Not that it's healthy or desired, and I'd be very happy for more hands and eyes :-).

@betatim
betatim deleted the multi-file-xfails branch August 14, 2026 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants