This repository was archived by the owner on Jun 10, 2020. It is now read-only.
File tree 1 file changed +6
-13
lines changed
1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -22,42 +22,35 @@ reveal_type(x) # E: <type name>
22
22
Right now, the error messages and types are must be ** contained within
23
23
corresponding mypy message** .
24
24
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
-
28
25
## Running the tests
29
26
30
27
To setup your test environment, cd into the root of the repo and run:
31
28
32
29
33
30
```
34
31
pip install -r test-requirements.txt
35
- pip install .
36
32
```
37
33
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
42
35
43
36
```
44
- py.test
37
+ python runtests.py
45
38
```
46
39
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:
49
42
50
43
```
44
+ pip install . # Make sure stubs are installed; runtests does this for you
51
45
mypy <file_path>
52
46
```
53
47
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
55
49
underlying Python interpreter. To ensure you're using the intended version of
56
50
Python you can use ` python -m ` versions of these commands instead:
57
51
58
52
```
59
53
python -m pip install -r test-requirements.txt
60
54
python -m pip install .
61
- python -m pytest
62
55
python -m mypy <file_path>
63
56
```
You can’t perform that action at this time.
0 commit comments