From 70e48ff799d7db882bb6d81d0b42935c2acf7135 Mon Sep 17 00:00:00 2001 From: Hassan Abouelela Date: Sun, 9 Oct 2022 04:15:35 +0400 Subject: [PATCH] Mention how to run stubtest directly on third party stubs (#8868) Signed-off-by: Hassan Abouelela --- tests/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/README.md b/tests/README.md index 499c3001e..994ef4d3e 100644 --- a/tests/README.md +++ b/tests/README.md @@ -136,6 +136,14 @@ check on the command line: (.venv3)$ python3 tests/stubtest_third_party.py Pillow toml # check stubs/Pillow and stubs/toml ``` +If you have the runtime package installed in your local virtual environment, you can also run stubtest +directly, with +``` +(.venv3)$ MYPYPATH= python3 -m mypy.stubtest \ + --custom-typeshed-dir \ + +``` + For each distribution, stubtest ignores definitions listed in a `@tests/stubtest_allowlist.txt` file, relative to the distribution. Additional packages that are needed to run stubtest for a distribution can be added to `@tests/requirements-stubtest.txt`.