orchestrata_tools.test_generator

Reference › orchestrata_tools › test_generator

Test generation: stubs, interface tests, branch coverage — now with enhanced @traces support.

The test_generator package generates pytest code from AST metadata. It is used by the scripts scripts.gen_tests and scripts.test-gen. There are two generations of generator side by side.

Generators share the parameter value strategies in testgen.types. Gaps to fill come from test_analyzer. Start with combined_generator for the simple path and testgen generator for the full pipeline.

18 modules, 4,909 lines of code.

Subpackages

Package Modules LOC
testgen 10 3,387

Modules

Module Summary LOC
__init__ Test generation: stubs, interface tests, branch coverage — now with enhanced @traces support. 27
behavioral_tests Generate behavioral tests from docstring Raises/Returns/Args clauses. 106
branch_tests Analyze method docstrings to identify branches and generate test cases. 115
combined_generator Unified test generation combining all strategies. 90
enhanced_generator Enhanced test generator — produces spec-compliant pytest stubs with @traces, async support, fixtures, and AAA pattern. 352
interface_tests Generate tests for Protocol and ABC classes. 118
jinja_gen Jinja2-powered test generator — deterministic, configurable, template-driven. 586
stub_generator Generate pytest test stubs from method signatures. 128

Dependency diagram

Package dependency diagram orchestrata_tools.test_generator