oracle generate <file.py> [-o <test_file.py>]
oracle check <file.py> --against <test_file.py>- Parse AST for
FunctionDefandClassDefnodes. - Extract
>>>doctest examples from docstrings. - Generate
def test_<name>(...):withassertstatements. - If no examples, emit placeholder assertions with default args.
- Scans test file for
test_*functions. - Infers tested function names by stripping
test_prefix. - Reports missing functions and percentage.
Pre-commit hook:
- run: oracle check src/ --against tests/