|
10 | 10 | if __name__ == "__main__":
|
11 | 11 | with tempfile.TemporaryDirectory() as tempdir:
|
12 | 12 | dirpath = Path(tempdir)
|
| 13 | + subprocess.run(["git", "clone", "--depth", "1", "git://github.com/python/mypy", dirpath / "mypy"], check=True) |
| 14 | + |
13 | 15 | subprocess.run(["python2.7", "-m", "pip", "install", "--user", "typing"], check=True)
|
14 |
| - subprocess.run(["git", "clone", "--depth", "1", "git://github.com/python/mypy", str(dirpath / "mypy")], check=True) |
15 | 16 | subprocess.run(
|
16 |
| - [sys.executable, "-m", "pip", "install", "-U", "-r", str(dirpath / "mypy/test-requirements.txt")], check=True |
| 17 | + [sys.executable, "-m", "pip", "install", "-U", "-r", dirpath / "mypy/test-requirements.txt"], check=True |
17 | 18 | )
|
18 |
| - shutil.copytree("stdlib", str(dirpath / "mypy/mypy/typeshed/stdlib")) |
19 |
| - shutil.copytree("third_party", str(dirpath / "mypy/mypy/typeshed/third_party")) |
| 19 | + shutil.copytree("stdlib", dirpath / "mypy/mypy/typeshed/stdlib") |
| 20 | + shutil.copytree("third_party", dirpath / "mypy/mypy/typeshed/third_party") |
20 | 21 | try:
|
21 |
| - subprocess.run(["pytest", "-n12"], cwd=str(dirpath / "mypy"), check=True) |
| 22 | + subprocess.run([sys.executable, "runtests.py", "typeshed-ci"], cwd=dirpath / "mypy", check=True) |
22 | 23 | except subprocess.CalledProcessError as e:
|
23 | 24 | print("mypy tests failed", file=sys.stderr)
|
24 | 25 | sys.exit(e.returncode)
|
|
0 commit comments