v0.5.1: Smoke Test Generation
What's New
Mechanical Smoke Tests (pact adopt)
pact adopt now generates smoke tests from AST-extracted function signatures — no LLM required, zero cost. Each public module-level function gets:
- An import verification test (module loads without error)
- A callable check test (function exists and is callable at module level)
Filters out class methods, private functions (_-prefixed), and nested closures (detected via source line indentation).
Output: tests/smoke/ — conventional location, committable, runnable with standard pytest.
Self-Adoption Results
| Codebase | Components | Functions | Smoke Tests |
|---|---|---|---|
| Pact | 57 | 682 | 248 (57 files) |
| Baton | 35 | 401 | 103 (35 files) |
Test Suite
1,886 total tests (1,638 hand-written + 248 smoke) — all passing.
Full Changelog
generate_smoke_tests()inadopt.py— mechanical test generation_is_module_level()— source line indentation check for nested function filtering- Smoke test output moved from
.pact/test-gen/smoke/totests/smoke/ - 8 new adopt unit tests covering smoke generation
- Updated docs, README, and landing page