16 lines
797 B
Python
16 lines
797 B
Python
import shutil
|
|
import subprocess
|
|
import unittest
|
|
|
|
from test_python_floor import readme_floor, ROOT
|
|
|
|
|
|
class Types(unittest.TestCase):
|
|
def test_mypy_passes_on_the_tools_at_the_floor(self):
|
|
floor = readme_floor()
|
|
self.assertIsNotNone(floor, "README.md's Install names `Python 3.N or newer`")
|
|
if shutil.which("uv") is None:
|
|
self.fail("uv on PATH fetches mypy; see README.md's Test line")
|
|
ran = subprocess.run(["uv", "tool", "run", "--python", "%d.%d" % floor, "mypy==2.3.1", "--cache-dir=/dev/null", "--check-untyped-defs", "--disallow-untyped-defs", "-p", "larv_review", "-p", "loop_claude", "-p", "metric_bench", "-m", "rank_todo", "-p", "reading_cost", "-m", "statusline"], capture_output=True, cwd=ROOT / "bin", text=True)
|
|
self.assertEqual(ran.returncode, 0, ran.stdout + ran.stderr)
|