Skip to content

Commit e20ca96

Browse files
committed
Improve README updates
1 parent 639ad79 commit e20ca96

File tree

1 file changed

+10
-18
lines changed

1 file changed

+10
-18
lines changed

README.md

+10-18
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ as well as the array libraries that you want to test.
2626

2727
To run the tests, you need to set the array library that is to be tested. There
2828
are two ways to do this. One way is to set the `ARRAY_API_TESTS_MODULE`
29-
environment variable. For example
29+
environment variable. For example you can set it when running `pytest`
3030

3131
ARRAY_API_TESTS_MODULE=numpy pytest
3232

@@ -39,34 +39,20 @@ array_module = None
3939

4040
to
4141

42-
```
42+
```py
4343
import numpy as array_module
4444
```
4545

4646
(replacing `numpy` with the array module namespace to be tested).
4747

48-
### Run pytest
49-
50-
Simply run the `pytest` command to run the whole test suite.
51-
52-
```bash
53-
pytest
54-
```
48+
### Specifying test cases
5549

5650
The test suite tries to logically organise its tests so you can find specific
5751
test cases whilst developing something in particular. So to avoid running the
5852
rather slow complete suite, you can specify particular test cases like any other
5953
test suite.
6054

61-
```bash
62-
pytest array_api_tests/test_creation_functions.py::test_zeros
63-
```
64-
65-
By default, tests for the optional Array API extensions such as
66-
[`linalg`](https://data-apis.org/array-api/latest/extensions/linear_algebra_functions.html)
67-
will be skipped if not present in the specified array module. You can purposely
68-
skip testing extension(s) via the `--disable-extension` option, and likewise
69-
purposely test them via the `--enable-extension` option.
55+
pytest array_api_tests/test_creation_functions.py::test_zeros
7056

7157
## Notes on Interpreting Errors
7258

@@ -93,6 +79,12 @@ purposely test them via the `--enable-extension` option.
9379

9480
## Configuring Tests
9581

82+
By default, tests for the optional Array API extensions such as
83+
[`linalg`](https://data-apis.org/array-api/latest/extensions/linear_algebra_functions.html)
84+
will be skipped if not present in the specified array module. You can purposely
85+
skip testing extension(s) via the `--disable-extension` option, and likewise
86+
purposely test them via the `--enable-extension` option.
87+
9688
The tests make heavy use of the
9789
[Hypothesis](https://hypothesis.readthedocs.io/en/latest/) testing library.
9890
Hypothesis generates random input values for the tests. You can configure how

0 commit comments

Comments
 (0)