@@ -162,18 +162,23 @@ This test requires Python 3.5 or higher.
162
162
Run using ` (.venv3)$ python3 tests/stubtest_test.py `
163
163
164
164
This test compares the stdlib stubs against the objects at runtime. Because of
165
- this, the output depends on which version of Python it is run with.
165
+ this, the output depends on which version of Python and on what kind of system
166
+ it is run.
167
+ Thus the easiest way to run this test is by enabling Travis CI on your fork;
168
+ if you run it locally, it'll likely complain about system-specific
169
+ differences (in e.g, ` socket ` ) that the type system cannot capture.
166
170
If you need a specific version of Python to repro a CI failure,
167
- [ pyenv] ( https://github.com/pyenv/pyenv ) can help (as can enabling Travis CI on
168
- your fork).
171
+ [ pyenv] ( https://github.com/pyenv/pyenv ) can help.
169
172
170
173
Due to its dynamic nature, you may run into false positives. In this case, you
171
174
can add to the whitelists for each affected Python version in
172
175
` tests/stubtest_whitelists ` . Please file issues for stubtest false positives
173
176
at [ mypy] ( https://github.com/python/mypy/issues ) .
174
177
175
178
To run stubtest against third party stubs, it's easiest to use stubtest
176
- directly. stubtest can also help you find things missing from the stubs.
179
+ directly, with `(.venv3)$ python3 -m mypy.stubtest --custom-typeshed-dir
180
+ <path-to-typeshed > <third-party-module >`.
181
+ stubtest can also help you find things missing from the stubs.
177
182
178
183
179
184
### flake8
0 commit comments