Run pytest with coverage and display results
Quick-reference skill for running pytest tests with async support in the rounds continuous error diagnosis system.
# Run all tests
/rounds-test
# Run specific test file
/rounds-test test_composition_root.py
# Run specific test directory
/rounds-test core
# Run tests matching a pattern
/rounds-test test_workflows.py::test_poll_cycle
Executes the pytest test suite for the rounds project with proper async handling and verbose output. This skill:
rounds/tests/ directory (line 53 of rounds/pyproject.toml)asyncio_mode = "auto" (line 52 of rounds/pyproject.toml)-vrounds/pyproject.tomltests/core/ - Pure domain logic tests with fakestests/adapters/ - Adapter implementations with real dependenciestests/integration/ - Full composition root validationThe rounds project uses fakes over mocks (fake implementations of ports in tests/fakes/) to ensure tests are maintainable and reflect real adapter behavior.
# Change to the rounds package directory (where pyproject.toml lives)
cd /home/austinsand/workspace/orchestrator/rounds/rounds
# Run pytest with the specified test path (or all tests if no path given)
if [ -n "$TEST_PATH" ]; then
pytest -v "tests/$TEST_PATH"
else
pytest -v
fi
Configuration details (from rounds/pyproject.toml):
test_*.py files (line 54)Test* classes (line 55)test_* functions (line 56)tests/ directory (line 53)/rounds-test
Output: Runs the entire test suite including:
tests/core/ - Domain logic unit teststests/adapters/ - Adapter integration teststests/fakes/ - Fake implementation validationtests/integration/ - End-to-end workflow teststest_composition_root.py, test_new_implementations.py, test_workflows.py/rounds-test test_composition_root.py
Output: Runs only the composition root tests (13,693 bytes of dependency injection validation)
/rounds-test core
Output: Runs unit tests for:
core/models.py - Immutable domain entities (Signature, Diagnosis, ErrorEvent)core/ports.py - Abstract port interfacescore/fingerprint.py - Error fingerprinting logiccore/triage.py - Error classificationcore/investigator.py - Investigation orchestration/rounds-test adapters
Output: Runs integration tests for concrete adapter implementations:
adapters/store/sqlite.py - SQLite persistence layeradapters/diagnosis/claude_code.py - Claude-powered diagnosis engineadapters/telemetry/ - Trace query implementations (SigNoz, Jaeger, etc.)/rounds-test test_workflows.py::test_poll_cycle
Output: Runs only the poll cycle workflow test (complete error detection → fingerprinting → diagnosis flow)
The rounds project follows hexagonal architecture testing principles:
tests/core/) use fakes from tests/fakes/ to validate business logic without external dependenciestests/adapters/) verify concrete implementations against port contractstests/integration/) validate full system composition in main.pyKey test files (from rounds/tests/):
test_composition_root.py (13KB) - Dependency wiring validationtest_new_implementations.py (25KB) - New feature integration teststest_workflows.py (16KB) - End-to-end diagnostic workflowsFake implementations (from tests/fakes/):
fakes/store.py - In-memory signature repositoryfakes/telemetry.py - Synthetic error event generatorfakes/diagnosis.py - Deterministic diagnosis engineThis skill was automatically generated from the rounds project structure and pyproject.toml configuration.