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.
Coverage¶
Coverage.py generates test coverage reports in text, HTML, and XML formats.
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.
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.