Skip to content

Testing

← Development · ← Contributing · README

Terminal window
uv run pytest tests/ -v

With coverage report:

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

test.yml runs the reusable ma-provider-tools test workflow on pull requests and weekly. Pushes to dev run the same gate through pipeline.yml before any release or fork sync.

CheckWhat it does
pytestRuns the full suite against the installed Music Assistant package
ruffLint and format check
mypyStrict type check of provider/ and tests/
codespell / pre-commitRepository hygiene and upstream rule gates

There is no Codecov upload in this repository; coverage is reported in the job log and can be generated locally as shown below.

ToolPurpose
uvVirtual environment and dependency management
Python 3.14Target Python version
pytestTest framework
pytest-covCoverage collection
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 is printed in the CI job log. To view it locally:

Terminal window
uv run pytest 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.