@@ -93,7 +93,9 @@ To run all tests, run the script `runtests.py` in the mypy repository:
9393Note that some tests will be disabled for older python versions.
9494
9595This will run all tests, including integration and regression tests,
96- and will type check mypy and verify that all stubs are valid.
96+ and will type check mypy and verify that all stubs are valid. This may
97+ take several minutes to run, so you don't want to use this all the time
98+ while doing development.
9799
98100You can run a subset of test suites by passing positive or negative
99101filters:
@@ -104,18 +106,23 @@ For example, to run unit tests only, which run pretty quickly:
104106
105107 $ ./runtests.py unit-test
106108
107- The unit test suites are driven by a mixture of test frameworks: mypy's own
108- ` myunit ` framework, and ` pytest ` , which we're in the process of migrating to.
109- Test suites for individual components are in the files ` mypy/test/test*.py ` .
110- You can run many of these individually by doing ` runtests.py testfoobar ` . For
111- finer control over which unit tests are run and how, you can run ` py.test ` or
112- ` scripts/myunit ` directly, or pass inferior arguments via ` -a ` :
109+ You can get a list of available test suites through the ` -l ` option
110+ (though this doesn't show all available subtasks):
111+
112+ $ ./runtests.py -l
113+
114+ The unit test suites are driven by a mixture of test frameworks: ` pytest ` and
115+ mypy's own ` myunit ` framework, which we're in the process of migrating away
116+ from. Test suites for individual components are in the files
117+ ` mypy/test/test*.py ` . You can run many of these individually by doing
118+ ` runtests.py testfoobar ` . For finer control over which unit tests are run and
119+ how, you can run ` pytest ` directly:
113120
114121 $ py.test mypy/test/testcheck.py -v -k MethodCall
115- $ ./runtests.py -v 'pytest mypy/test/testcheck' -a -v -a -k -a MethodCall
116122
117- $ PYTHONPATH=$PWD scripts/myunit -m mypy.test.testlex -v '*backslash*'
118- $ ./runtests.py mypy.test.testlex -a -v -a '*backslash*'
123+ You can pass inferior arguments to pytest via ` -a ` when using ` runtests.py ` :
124+
125+ $ ./runtests.py pytest -a -v -a -k -a MethodCall
119126
120127You can also run the type checker for manual testing without
121128installing it by setting up the Python module search path suitably:
@@ -163,8 +170,7 @@ the number of processes to use. The default (set in `./pytest.ini`) is the
163170number of logical cores; this can be overridden using ` -n ` option.
164171
165172Note that running more processes than logical cores is likely to
166- significantly decrease performance; the relevant count is the number of
167- processes used by ` runtests.py ` plus those used by ` pytest ` .
173+ significantly decrease performance.
168174
169175
170176Coverage reports
0 commit comments