mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-20 00:28:28 +08:00
Unify test directory handling (#11864)
Previously, handling of test directories (`@tests` and `test_cases`) was distributed over multiple files and redundant. This unifies the handling in the `utils` module. This also fixes some instances where "package" was used instead of "distribution". And in a few instances paths were joined by using a `/` in a string, which is incompatible with Windows. Also move `runtests.py` from `scripts` to `tests`. This is required so that we can import `utils`, but it's also arguably the better fit. The only mention of the script is actually in the `tests/README.md` file. Helps with #11762.
This commit is contained in:
@@ -36,7 +36,7 @@ You can list or install all of a stubs package's external dependencies using the
|
||||
|
||||
Run using:
|
||||
```bash
|
||||
(.venv3)$ python3 scripts/runtests.py <stdlib-or-stubs>/<stub-to-test>
|
||||
(.venv3)$ python3 tests/runtests.py <stdlib-or-stubs>/<stub-to-test>
|
||||
```
|
||||
|
||||
This script will run all tests below for a specific typeshed directory. If a
|
||||
@@ -46,7 +46,7 @@ be selected. A summary of the results will be printed to the terminal.
|
||||
You must provide a single argument which is a path to the stubs to test, like
|
||||
so: `stdlib/os` or `stubs/requests`.
|
||||
|
||||
Run `python scripts/runtests.py --help` for information on the various configuration options
|
||||
Run `python tests/runtests.py --help` for information on the various configuration options
|
||||
for this script. Note that if you use the `--run-stubtest` flag with the stdlib stubs,
|
||||
whether or not the test passes will depend on the exact version of Python
|
||||
you're using, as well as various other details regarding your local environment.
|
||||
|
||||
Reference in New Issue
Block a user