14 lines
390 B
Python
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 == {}
|
|
|