mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-08 11:46:35 +00:00
Adds tests/utils/fs.py with process-level @lru_cache for both the project-wide os.walk and per-file read_text(), then migrates 26 tests (24 modified + 2 new) that previously re-walked/re-read the tree independently to share one cached pass. Headline win: tests/integration/jinja/test_variable_usage.py drops from ~26s to ~1.3s (≈19x), jinja cluster as a whole ~14x. Other migrated tests benefit from the shared content cache when the same file is read by multiple scans in one pytest run. Non-caching logic changes (kept intentionally): - test_variable_usage.py: added `if varname not in content: continue` fast-path before the line loop (pure short-circuit, identical result). - test_test_file_naming.py: exempt tests/utils/ from the test_*.py prefix rule so the new shared helpers don't trip the lint. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
0 lines
0 B
Python
0 lines
0 B
Python
The file is empty.