Files
uconsole_asw_game/tests/test_module_size.py
T
db9979andClaude Fable 5.1 facd86e107 Core split 6/6: Remote Crew transport into src/commander/v2 (wire, commands, routes)
server.py keeps CommanderServer and re-exports the rest; the grant table
moves to wire.py so the routes never import the server module. The public
logger name stays src.commander.server. tests/test_module_size.py holds every
source module under 2500 lines.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-27 01:33:55 +02:00

16 lines
438 B
Python

"""Plan 1.3, phase 2: no source module grows back into a monolith."""
from pathlib import Path
LIMIT = 2500
SRC = Path(__file__).resolve().parent.parent / "src"
def test_no_source_module_exceeds_the_line_limit():
oversized = {
str(path.relative_to(SRC.parent)): count
for path in SRC.rglob("*.py")
if (count := sum(1 for _ in path.open(encoding="utf-8"))) > LIMIT
}
assert not oversized, oversized