Testing and Coverage¶
Test suites¶
- Unit tests:
tests/test_*.py - Domain/API tests:
tests/api,tests/admin_panel,tests/contract - Pipeline/reliability tests:
tests/reorg,tests/reconciliation,tests/idempotency - E2E pipeline test:
tests/e2e/test_pipeline.py
Local test commands¶
uv run pytest -q tests
uv run pytest -q tests -rs
Coverage command¶
uv run pytest -q tests --cov=src/ft --cov-report=term-missing --cov-report=xml
CI requirement in .github/workflows/ci.yml:
- Minimum coverage:
90%(--cov-fail-under=90)
Static checks¶
uv run ruff check src tests
uv run ruff format --check src tests
uv run python -m compileall -q src tests migrations