Commit Graph

1 Commits

Author SHA1 Message Date
Alexander Whitestone
8d1f9ed375 feat(#667): codebase_genome.py — test stub generator for uncovered functions
Some checks failed
Smoke Test / smoke (pull_request) Failing after 20s
AST-based tool that scans Python files, extracts function/method signatures,
and generates pytest test stubs for functions without existing tests.

Usage:
  python3 codebase_genome.py /path/to/repo
  python3 codebase_genome.py /path/to/repo -o tests/test_genome_generated.py

Features:
- AST parsing (no imports required, handles syntax errors gracefully)
- Extracts: function name, args, return type, decorators, class context
- Detects existing tests to avoid duplicates
- Generates: basic test + edge case test per function
- Skips private/dunder methods
- Configurable limit (--limit N)

Generated 30 test stubs for timmy-home as proof of concept.
2026-04-14 23:39:13 -04:00