From 05f91f73b3e0774b336f769b6cca8773182be9c2 Mon Sep 17 00:00:00 2001 From: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Date: Tue, 25 May 2021 01:42:18 -0700 Subject: [PATCH] Re-enable mypy test suite (#5526) Fixes #5505, in combination with https://github.com/python/mypy/pull/10527 Co-authored-by: hauntsaninja <> --- .github/workflows/tests.yml | 16 ++++++++-------- tests/mypy_test_suite.py | 3 +++ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8ac416b6a..7cf0d5c0d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -72,14 +72,14 @@ 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 + 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 diff --git a/tests/mypy_test_suite.py b/tests/mypy_test_suite.py index 6ae1c1761..7f0995d7e 100755 --- a/tests/mypy_test_suite.py +++ b/tests/mypy_test_suite.py @@ -18,6 +18,9 @@ if __name__ == "__main__": ) 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: