Skip to main content
Loading page…
Python Mastery
Chapter 26
Lesson 3 of 4
Coverage & Test Quality
Contents
Notes
Tutor
Concept
coverage.py and pytest-cov
Loading activity…
Previous
1 / 9
Continue
Contents
Notes
Discussion
Tutor
22 min
9 activities
0 of 9 done
In this lesson
1
coverage.py and pytest-cov
2
Branch Coverage: Beyond Line Coverage
3
The 100% Coverage Fallacy
4
Mutation Testing: Are Your Tests Actually Asserting?
5
Reading a Coverage HTML Report
6
Coverage vs Correctness
7
Coverage Tools and Concepts
8
Order the Coverage Workflow Steps
9
Don't Chase 100% at the Expense of Good Tests
Objectives
Run pytest-cov and interpret line and branch coverage reports
Set up a .coveragerc file with appropriate configuration
Explain why 100% coverage does not guarantee correctness
Describe mutation testing and how it reveals weak assertions
Set realistic coverage targets for different kinds of code
Chapter 26 · Advanced Testing: Hypothesis, Faker & Coverage
Property-Based Testing with Hypothesis
Fixtures, Factories & Fake Data
Coverage & Test Quality
Multi-Env Testing with tox, nox & CI
Previous: Fixtures, Factories & Fake Data
Next: Multi-Env Testing with tox, nox & CI