Skip to content

Testing

← Development · ← Contributing · README

Terminal window
uv run pytest provider/tests/ -v

With coverage report:

Terminal window
uv run pytest provider/tests/ -v --cov=provider/ --cov-report=term-missing

Every push and pull request triggers two parallel jobs via test.yml:

JobWhat it does
test-*Runs pytest with coverage, uploads report to Codecov
lint-*Runs ruff, mypy, codespell, pre-commit

Tests run against trudenboy/ma-server@dev (plugin-enabled fork — full CI with ruff + mypy).

ToolPurpose
uvVirtual environment and dependency management
Python 3.12Target Python version
pytestTest framework
pytest-covCoverage collection
CodecovCoverage report upload (automatic in CI)
ruffPython linter and formatter
mypyStatic type checker
codespellSpell-checking for source code
pre-commitPre-commit hook runner

Run all pre-commit hooks (recommended before opening a PR):

Terminal window
uv run pre-commit run --all-files

Type checking only:

Terminal window
uv run mypy provider/

Linting only:

Terminal window
uv run ruff check provider/
uv run ruff format --check provider/

Coverage reports are automatically uploaded to Codecov on every CI push. To view coverage locally:

Terminal window
uv run pytest provider/tests/ --cov=provider/ --cov-report=html
open htmlcov/index.html

When tests or linters fail in CI, a GitHub issue is automatically created with the incident:ci label. See Incident Management for how the incident workflow operates.