Interview Prep/Python for DevOps/Testing, services & metrics

What does test coverage tell you, and what target do you set?

IntermediateConceptTesting, services & metrics
Answer

Coverage (pytest --cov=pkg --cov-report=term-missing) shows which lines and branches ran during tests. It finds untested code; it does not prove the tests assert anything meaningful. We enforce a floor in CI (--cov-fail-under=80) and care most that destructive paths, error handling and edge cases are covered. Use --cov-branch to catch untested if branches.

All Python for DevOps questions Roadmap: Python for automation

More on Testing, services & metrics