All quizzes
Free quiz · 22 questions in the bank

pytest-cov quiz

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
  1. What does `--cov-append` do?
  2. What is a `.coveragerc` (or `[tool.coverage.run]` in `pyproject.toml`) file used for?
  3. 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?
  4. What is the effect of adding `# pragma: no cover` as a comment on a line or block?
  5. How does pytest-cov typically get configured for a project so contributors don't need to remember the CLI flags?
  6. What is the typical output of `pytest --cov=mypackage --cov-report=html` beyond the terminal summary?
  7. What is "branch coverage", and how does it differ from plain line coverage?
  8. Why is 100% coverage NOT the same thing as "the code is fully tested and bug-free"?
  9. What is the purpose of the `--cov-report` flag?
  10. What does setting `branch = True` in a `.coveragerc`'s `[run]` section change about the coverage report?
  11. What is a reasonable strategy for choosing which coverage percentage to enforce as a CI gate (`--cov-fail-under`)?
  12. How can pytest-cov be used to identify specific untested lines in a file?
Gaps to close?
Read the curated pytest-cov notes — core concepts, patterns, interview prep.
pytest-cov notes

More quizzes

.NET.NET MAUIAbsintheAccessibilityActixActix Web