Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content
This repository was archived by the owner on Jun 10, 2020. It is now read-only.

Commit 98959aa

Browse files
authored
DOC: update testing README (#75)
- Remove note about py2 tests versus py3 tests - Recommend using `runtests.py`
1 parent 2011153 commit 98959aa

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

tests/README.md

+6-13
Original file line numberDiff line numberDiff line change
@@ -22,42 +22,35 @@ reveal_type(x) # E: <type name>
2222
Right now, the error messages and types are must be **contained within
2323
corresponding mypy message**.
2424

25-
Test files that end in `_py3.py` will only be type checked against Python 3.
26-
All other test files must be valid in both Python 2 and Python 3.
27-
2825
## Running the tests
2926

3027
To setup your test environment, cd into the root of the repo and run:
3128

3229

3330
```
3431
pip install -r test-requirements.txt
35-
pip install .
3632
```
3733

38-
Note that due to how mypy reads type information in PEP 561 packages, you'll
39-
need to re-run the `pip install .` command each time you change the stubs.
40-
41-
We use `py.test` to orchestrate our tests. You can just run:
34+
To run the tests, do
4235

4336
```
44-
py.test
37+
python runtests.py
4538
```
4639

47-
to run the entire test suite. To run `mypy` on a specific file (which
48-
can be useful for debugging), you can also run:
40+
from the repo root. To run `mypy` on a specific file (which can be
41+
useful for debugging), you can also run:
4942

5043
```
44+
pip install . # Make sure stubs are installed; runtests does this for you
5145
mypy <file_path>
5246
```
5347

54-
Note that it is assumed that all of these commands target the same
48+
Note that it is assumed that all of these commands target the same
5549
underlying Python interpreter. To ensure you're using the intended version of
5650
Python you can use `python -m` versions of these commands instead:
5751

5852
```
5953
python -m pip install -r test-requirements.txt
6054
python -m pip install .
61-
python -m pytest
6255
python -m mypy <file_path>
6356
```

0 commit comments

Comments
 (0)