Files
cs249r_book/book/tests/test_binder_cli_contract.py
2026-05-30 13:41:34 -04:00

18 lines
399 B
Python

from pathlib import Path
from book.cli.checks.cli_contract import CASES, run_contract
ROOT = Path(__file__).resolve().parents[2]
def test_binder_cli_contract_is_stable():
violations = run_contract(ROOT)
rendered = "\n".join(
f"{v.code}: {v.message}\n{v.context}\n{v.suggestion}"
for v in violations
)
assert not violations, rendered
assert len(CASES) >= 10