Files
agentci/tests/test_line_limits.py
2026-07-19 12:21:26 +02:00

14 lines
390 B
Python

from pathlib import Path
def test_python_files_are_at_most_250_lines() -> None:
root = Path(__file__).parents[1]
files = [*root.glob("src/**/*.py"), *root.glob("tests/**/*.py")]
oversized = {
str(path.relative_to(root)): len(path.read_text().splitlines())
for path in files
if len(path.read_text().splitlines()) > 250
}
assert oversized == {}