Testing Summary
pytest is the standard Python testing tool. Use fixtures for shared setup, parametrize for data-driven tests, mock for dependencies, and pytest-cov for coverage. Run tests in CI on every commit.
pytest is the standard Python testing tool. Use fixtures for shared setup, parametrize for data-driven tests, mock for dependencies, and pytest-cov for coverage. Run tests in CI on every commit.
# pyproject.toml test configuration
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
addopts = "--cov=src --cov-report=term-missing --cov-fail-under=80"
# GitHub Actions
- run: pytest --tb=short -q
Fast tests get run; slow tests get skipped. Keep the suite under 60 seconds for continuous feedback.