Skip to content

Testing

The template configures a full testing setup with pytest, coverage reporting, and optional multi-version testing.

pytest

pytest is the default test runner. Tests live in the tests/ directory.

make test
mise run test

Coverage

Coverage.py generates test coverage reports in text, HTML, and XML formats.

make coverage
mise run coverage

The coverage threshold is configurable via the coverage_threshold template variable (default: 100%).

Tox

Tox with tox-uv runs your test suite across multiple Python versions.

make tox
mise run tox

Tox is included by default but can be disabled by setting tox: false during project generation.

pytest-xdist

For parallel test execution, enable the pytest_xdist option during generation. This adds pytest-xdist to your test dependencies.

# Tests automatically run in parallel when pytest-xdist is installed
make test
# Tests automatically run in parallel when pytest-xdist is installed
mise run test