stubtest_third_party: more newlines in printing (#6060)

Co-authored-by: hauntsaninja <>
This commit is contained in:
Shantanu
2021-09-21 14:16:12 -07:00
committed by GitHub
parent 15cec1da8e
commit 67e8979ac1

View File

@@ -105,9 +105,10 @@ def run_stubtest(dist: Path) -> None:
subprocess.run(cmd, env={"MYPYPATH": str(dist), "MYPY_FORCE_COLOR": "1"}, check=True)
except subprocess.CalledProcessError:
print(f"stubtest failed for {dist.name}", file=sys.stderr)
print("\n\n", file=sys.stderr)
if not allowlist_path.exists():
print(
"\n\nRe-running stubtest with --generate-allowlist.\n"
"Re-running stubtest with --generate-allowlist.\n"
f"Add the following to {allowlist_path}:"
)
subprocess.run(cmd + ["--generate-allowlist"], env={"MYPYPATH": str(dist)})
@@ -115,6 +116,7 @@ def run_stubtest(dist: Path) -> None:
raise StubtestFailed from None
else:
print(f"stubtest succeeded for {dist.name}", file=sys.stderr)
print("\n\n", file=sys.stderr)
# Keep this in sync with mypy_test.py