@@ -98,6 +98,7 @@ runs tests against [mypy](https://github.com/python/mypy/)
98
98
typeshed.
99
99
- ` tests/check_consistent.py ` checks certain files in typeshed remain
100
100
consistent with each other.
101
+ - ` tests/stubtest_test.py ` checks stubs against the objects at runtime.
101
102
- ` flake8 ` enforces a style guide.
102
103
103
104
### Setup
@@ -155,6 +156,27 @@ than the other tests.
155
156
156
157
Run using: ` python3 tests/check_consistent.py `
157
158
159
+ ### stubtest_test.py
160
+
161
+ This test requires Python 3.5 or higher.
162
+ Run using ` (.venv3)$ python3 tests/stubtest_test.py `
163
+
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.
166
+ 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).
169
+
170
+ Due to its dynamic nature, you may run into false positives. In this case, you
171
+ can add to the whitelists for each affected Python version in
172
+ ` tests/stubtest_whitelists ` . Please file issues for stubtest false positives
173
+ at [ mypy] ( https://github.com/python/mypy/issues ) .
174
+
175
+ To run stubtest against third party stubs, it's easiest to
176
+ [ use stubtest directly] ( https://github.com/python/mypy/blob/master/scripts/stubtest.py ) .
177
+ stubtest can also help you find things missing from the stubs.
178
+
179
+
158
180
### flake8
159
181
160
182
flake8 requires Python 3.6 or higher. Run using: ` (.venv3)$ flake8 `
0 commit comments