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.
More on Testing, services & metrics
Why should automation scripts have tests at all?BeginnerHow does pytest discover and run tests?BeginnerWhy does pytest use plain `assert` instead of `assertEqual`?BeginnerWhat are pytest fixtures, and what scopes exist?IntermediateWhat built-in fixtures do you use most?IntermediateHow does `@pytest.mark.parametrize` work?Beginner