diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7cf0d5c0d..3683bfb2d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -72,15 +72,6 @@ jobs: - run: pip install -U git+git://github.com/python/mypy - run: ./tests/mypy_test.py --platform=${{ matrix.platform }} - mypy-test-suite: - name: Run the mypy test suite - # Ubuntu 20.04 doesn't have the Python 2 venv module. - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - - run: ./tests/mypy_test_suite.py - pyright: name: Run pyright against the stubs runs-on: ubuntu-latest diff --git a/tests/README.md b/tests/README.md index af07c010e..49c6fba51 100644 --- a/tests/README.md +++ b/tests/README.md @@ -5,8 +5,6 @@ tests typeshed with [mypy](https://github.com/python/mypy/) [pytype](https://github.com/google/pytype/). - `tests/pyright_test.py` tests typeshed with [pyright](https://github.com/microsoft/pyright). -- `tests/mypy_test_suite.py` runs a subset of mypy's test suite using this version of -typeshed. - `tests/check_consistent.py` checks certain files in typeshed remain consistent with each other. - `tests/stubtest_test.py` checks stubs against the objects at runtime. @@ -53,18 +51,6 @@ but it uses the same pyright version and configuration as the CI. (.venv3)$ python3 tests/pyright_test.py stdlib/sys.pyi # Check one file ``` -## mypy\_test\_suite.py - -This test requires Python 3.5 or higher; Python 3.6.1 or higher is recommended. -Run using: -``` -(.venv3)$ python3 tests/mypy_test_suite.py -``` - -This test runs mypy's own test suite using the typeshed code in your repo. This -will sometimes catch issues with incorrectly typed stubs, but is much slower -than the other tests. - ## check\_consistent.py Run using: diff --git a/tests/mypy_test_suite.py b/tests/mypy_test_suite.py deleted file mode 100755 index 7f0995d7e..000000000 --- a/tests/mypy_test_suite.py +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env python3 -"""Script to run mypy's test suite against this version of typeshed.""" - -import shutil -import subprocess -import sys -import tempfile -from pathlib import Path - -if __name__ == "__main__": - with tempfile.TemporaryDirectory() as tempdir: - dirpath = Path(tempdir) - subprocess.run(["git", "clone", "--depth", "1", "git://github.com/python/mypy", dirpath / "mypy"], check=True) - - subprocess.run(["python2.7", "-m", "pip", "install", "--user", "typing"], check=True) - subprocess.run( - [sys.executable, "-m", "pip", "install", "-U", "-r", dirpath / "mypy/test-requirements.txt"], check=True - ) - shutil.rmtree(dirpath / "mypy/mypy/typeshed/stdlib") - shutil.copytree("stdlib", dirpath / "mypy/mypy/typeshed/stdlib") - - shutil.rmtree(dirpath / "mypy/mypy/typeshed/stubs/mypy-extensions") - shutil.copytree(Path("stubs/mypy-extensions"), dirpath / "mypy/mypy/typeshed/stubs/mypy-extensions") - try: - subprocess.run([sys.executable, "runtests.py", "typeshed-ci"], cwd=dirpath / "mypy", check=True) - except subprocess.CalledProcessError as e: - print("mypy tests failed", file=sys.stderr) - sys.exit(e.returncode) - else: - print("mypy tests succeeded", file=sys.stderr) - sys.exit(0)