# Full suite (requires the deprecated authoring shims to resolve)
pip install -e ".[dev,authoring]"
pytest
# Zero-dep contract: shim tests skip via pytest.importorskip
pip install -e ".[dev]"
pytest
# With coverage (matches CI's ubuntu x py3.11 cell)
pip install -e ".[dev,authoring]"
pytest --cov --cov-report=term-missingThe slow marker covers tests that create real venvs
(test_zero_dep_install.py). Skip with pytest -m "not slow" for fast
iteration.
attune-help itself makes no LLM calls. Cross-layer integration tests that could exercise an LLM follow the attune-author reference pattern:
- Strip
ANTHROPIC_API_KEYvia an autouse fixture so a misconfigured test never reaches the network. - Patch
anthropic.Anthropicat import time, not at call site. - Reset module-level singletons (e.g.
_RagPipeline) between tests with an autouse fixture so a leaked patch doesn't poison later tests.
See attune-author/tests/conftest.py (_lenient_polish_by_default,
_reset_rag_pipeline). Pass 2 of the test-strategy spec will formalize
this into a shared docs/testing-conventions.md across layers.
Tracked in
/Users/patrickroebuck/attune/specs/test-strategy/current-state.md. After
pass 1, the highest-value remaining gaps in this layer are:
cli.py(~70% branch coverage) — argparse error pathsengine.py(~86%) — depth-progression edge casestransformers.py(~78%) — channel-specific render branches
Pass 2 will revisit thresholds and target those areas if needed.
tests/test_zero_dep_install.py— guards tech.md ADR-002 (zero required deps beyondpython-frontmatter). Spins up a fresh venv per test case; marked@pytest.mark.slow.tests/test_storage_protocol.py— reusable mixin verifying theSessionStorageProtocol contract. New backends (Redis, DB) inherit fromStorageProtocolTesterand override_make_storage().tests/test_authoring_shims.py— verifies the deprecated re-export shims still resolve correctly while the[authoring]extra is installed. Sunset 2026-07-07.