Test your pytest-cov knowledge with a free interactive quiz — 22 questions with answers and explanations. No signup needed to play.
Question 1/5Score 0
What does `--cov-append` do?
Questions in this quiz
What does `--cov-append` do?
What is a `.coveragerc` (or `[tool.coverage.run]` in `pyproject.toml`) file used for?
If a project's coverage percentage suddenly drops after a pull request, what is the most direct way to see exactly what caused it using pytest-cov's output?
What is the effect of adding `# pragma: no cover` as a comment on a line or block?
How does pytest-cov typically get configured for a project so contributors don't need to remember the CLI flags?
What is the typical output of `pytest --cov=mypackage --cov-report=html` beyond the terminal summary?
What is "branch coverage", and how does it differ from plain line coverage?
Why is 100% coverage NOT the same thing as "the code is fully tested and bug-free"?
What is the purpose of the `--cov-report` flag?
What does setting `branch = True` in a `.coveragerc`'s `[run]` section change about the coverage report?
What is a reasonable strategy for choosing which coverage percentage to enforce as a CI gate (`--cov-fail-under`)?
How can pytest-cov be used to identify specific untested lines in a file?