You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/README.md
+27-17Lines changed: 27 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,26 +1,28 @@
1
1
This directory contains several tests:
2
+
2
3
-`tests/mypy_test.py`
3
-
tests the stubs with [mypy](https://github.com/python/mypy/)
4
+
tests the stubs with [mypy](https://github.com/python/mypy/)
4
5
-`tests/pyright_test.py` tests the stubs with
5
-
[pyright](https://github.com/microsoft/pyright).
6
+
[pyright](https://github.com/microsoft/pyright).
6
7
-`tests/regr_test.py` runs mypy against the test cases for typeshed's
7
-
stubs, guarding against accidental regressions.
8
+
stubs, guarding against accidental regressions.
8
9
-`tests/check_typeshed_structure.py` checks that typeshed's directory
9
-
structure and metadata files are correct.
10
+
structure and metadata files are correct.
10
11
-`tests/stubtest_stdlib.py` checks standard library stubs against the
11
-
objects at runtime.
12
+
objects at runtime.
12
13
-`tests/stubtest_third_party.py` checks third-party stubs against the
13
-
objects at runtime.
14
+
objects at runtime.
14
15
-`tests/typecheck_typeshed.py` runs mypy against typeshed's own code
15
-
in the `tests` and `scripts` directories.
16
+
in the `tests` and `scripts` directories.
16
17
17
18
To run the tests, follow the [setup instructions](../CONTRIBUTING.md#preparing-the-environment)
18
-
in the `CONTRIBUTING.md` document. In particular, you have to run with Python 3.9+.
19
+
in the `CONTRIBUTING.md` document.
19
20
20
21
In order for `pyright_test` to work correctly, some third-party stubs
21
22
may require extra dependencies external to typeshed to be installed in your virtual environment
22
23
prior to running the test.
23
24
You can list or install all of a stubs package's external dependencies using the following script:
25
+
24
26
```bash
25
27
(.venv)$ python tests/get_external_stub_requirements.py <third_party_stub># List external dependencies for <third_party_stub>
26
28
(.venv)$ python tests/get_external_stub_requirements.py <third_party_stub1><third_party_stub2># List external dependencies for <third_party_stub1> and <third_party_stub2>
@@ -31,6 +33,7 @@ You can list or install all of a stubs package's external dependencies using the
0 commit comments