@@ -151,15 +151,74 @@ library to fail.
151
151
152
152
### Configuration
153
153
154
+ #### CI flag
155
+
154
156
Use the ` --ci ` flag to run only the primary and special cases tests. You can
155
157
ignore the other test cases as they are redundant for the purposes of checking
156
158
compliance.
157
159
160
+ #### Extensions
161
+
158
162
By default, tests for the optional Array API extensions such as
159
163
[ ` linalg ` ] ( https://data-apis.org/array-api/latest/extensions/linear_algebra_functions.html )
160
164
will be skipped if not present in the specified array module. You can purposely
161
165
skip testing extension(s) via the ` --disable-extension ` option.
162
166
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
+
163
222
The tests make heavy use
164
223
[Hypothesis](https://hypothesis.readthedocs.io/en/latest/). You can configure
165
224
how many examples are generated using the ` --max-examples` flag, which defaults
0 commit comments