MCPcopy Create free account
hub / github.com/vercel/vercel / test_cqa_mypy

Method test_cqa_mypy

python/vercel-workers/tests/test_sourcecode.py:47–72  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

45
46 @unittest.skip("disabled for now")
47 def test_cqa_mypy(self):
48 config_path = PROJECT_ROOT / "pyproject.toml"
49 if not os.path.exists(config_path):
50 raise RuntimeError("could not locate pyproject.toml file")
51
52 if not importlib.util.find_spec("mypy"):
53 raise unittest.SkipTest("mypy is not installed") from None
54
55 try:
56 subprocess.run(
57 [
58 sys.executable,
59 "-m",
60 "mypy",
61 "--config-file",
62 config_path,
63 ],
64 check=True,
65 capture_output=True,
66 cwd=PROJECT_ROOT,
67 )
68 except subprocess.CalledProcessError as ex:
69 output = ex.stdout.decode()
70 if ex.stderr:
71 output += "\n\n" + ex.stderr.decode()
72 raise AssertionError(f"mypy validation failed:\n{output}") from None
73
74 @unittest.skip("disabled for now")
75 def test_cqa_pyright(self):

Callers

nothing calls this directly

Calls 2

decodeMethod · 0.80
runMethod · 0.65

Tested by

no test coverage detected