Python·100 questions

How to measure test coverage?

Answer
coverage.py or pytest-cov.
Run: pytest --cov=package.
View the HTML report.
High coverage does not guarantee quality, but helps.
Goal: cover critical business logic.
Was this answer helpful?

More questions in this topic

Related questions from other topics