@@ -151,15 +151,74 @@ library to fail.
151151
152152### Configuration
153153
154+ #### CI flag
155+
154156Use the ` --ci ` flag to run only the primary and special cases tests. You can
155157ignore the other test cases as they are redundant for the purposes of checking
156158compliance.
157159
160+ #### Extensions
161+
158162By default, tests for the optional Array API extensions such as
159163[ ` linalg ` ] ( https://data-apis.org/array-api/latest/extensions/linear_algebra_functions.html )
160164will be skipped if not present in the specified array module. You can purposely
161165skip testing extension(s) via the ` --disable-extension ` option.
162166
167+ #### Skip test cases
168+
169+ Test cases you want to skip can be specified in a ` skips.txt ` file in the root
170+ of this repository, e.g.:
171+
172+ ```
173+ # ./skips.txt
174+ # Line comments can be denoted with the hash symbol (#)
175+
176+ # Skip specific test case, e.g. when argsort() does not respect relative order
177+ # https://github.com/numpy/numpy/issues/20778
178+ array_api_tests/test_sorting_functions.py::test_argsort
179+
180+ # Skip specific test case parameter, e.g. you forgot to implement in-place adds
181+ array_api_tests/test_add[__iadd__(x1, x2)]
182+ array_api_tests/test_add[__iadd__(x, s)]
183+
184+ # Skip module, e.g. when your set functions treat NaNs as non-distinct
185+ # https://github.com/numpy/numpy/issues/20326
186+ array_api_tests/test_set_functions.py
187+ ```
188+
189+ For GitHub Actions, you might like to keep everything in the workflow config
190+ instead of having a seperate ` skips.txt ` file, e.g.:
191+
192+ ``` yaml
193+ # ./.github/workflows/array_api.yml
194+ ...
195+ ...
196+ - name : Run the test suite
197+ env :
198+ ARRAY_API_TESTS_MODULE : your.array.api.namespace
199+ run : |
200+ # Skip test cases with known issues
201+ cat << EOF >> skips.txt
202+
203+ # Skip specific test case, e.g. when argsort() does not respect relative order
204+ # https://github.com/numpy/numpy/issues/20778
205+ array_api_tests/test_sorting_functions.py::test_argsort
206+
207+ # Skip specific test case parameter, e.g. you forgot to implement in-place adds
208+ array_api_tests/test_add[__iadd__(x1, x2)]
209+ array_api_tests/test_add[__iadd__(x, s)]
210+
211+ # Skip module, e.g. when your set functions treat NaNs as non-distinct
212+ # https://github.com/numpy/numpy/issues/20326
213+ array_api_tests/test_set_functions.py
214+
215+ EOF
216+
217+ pytest -v -rxXfE --ci
218+ ` ` `
219+
220+ #### Max examples
221+
163222The tests make heavy use
164223[Hypothesis](https://hypothesis.readthedocs.io/en/latest/). You can configure
165224how many examples are generated using the ` --max-examples` flag, which defaults
0 commit comments