Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tests/stubtest_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
typeshed CI.

"""
print("run stubtest_test.py", __name__)

from pathlib import Path
import subprocess
import sys


def run_stubtest(typeshed_dir: Path) -> int:
print("enter run_stubtest()")
whitelist_dir = typeshed_dir / "tests" / "stubtest_whitelists"
version_whitelist = "py{}{}.txt".format(sys.version_info.major, sys.version_info.minor)
platform_whitelist = "{}.txt".format(sys.platform)
Expand Down Expand Up @@ -55,6 +57,7 @@ def run_stubtest(typeshed_dir: Path) -> int:
# As discussed in https://github.com/python/typeshed/issues/3693, we only aim for
# positional-only arg accuracy for the latest Python version.
cmd += ["--ignore-positional-only"]
print("cmd", cmd)
try:
print(" ".join(cmd), file=sys.stderr)
subprocess.run(cmd, check=True)
Expand All @@ -74,4 +77,5 @@ def run_stubtest(typeshed_dir: Path) -> int:


if __name__ == "__main__":
print("if __main__ block")
sys.exit(run_stubtest(typeshed_dir=Path(".")))