orchestrata_tools.test_analyzer
Reference › orchestrata_tools › test_analyzer
Test analysis: matching, coverage, gap detection.
The test_analyzer package works out which source methods have tests and where the gaps are, using only the AST of the source and of the tests.
- matcher:
TestMatcherpairs tests with source methods using ordered naming strategies, import awareness and the body-based result. - body_matcher:
BodyMatcherparses test files and records which methods each test calls, including through fixtures. - call_extraction: the pure per-function call extraction that body matching relies on.
- coverage:
CoverageAnalyzerturns matches into percentages and gaps.
The result types are in test_models. Flow: call extraction feeds the body matcher, the body matcher feeds the matcher, and the matcher feeds coverage. The discover command of __main__ and the test_generator combined generator use the results. Start with matcher.
5 modules, 1,238 lines of code.
Modules
| Module | Summary | LOC |
|---|---|---|
__init__ |
Test analysis: matching, coverage, gap detection. | 6 |
body_matcher |
Body-based test-to-source matching using Python AST. | 450 |
call_extraction |
Pure per-function call extraction for the test-analysis pipeline. | 212 |
coverage |
Coverage analysis: compute metrics and identify gaps. | 102 |
matcher |
Deterministic test-to-source-method matching engine. | 468 |