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/12Score 0

What does setting `branch = True` in a `.coveragerc`'s `[run]` section change about the coverage report?

In this round
  1. What does setting `branch = True` in a `.coveragerc`'s `[run]` section change about the coverage report?
  2. What does `--cov-fail-under=N` do?
  3. What is the effect of adding `# pragma: no cover` as a comment on a line or block?
  4. What does `--cov-append` do?
  5. How can pytest-cov be used to identify specific untested lines in a file?
  6. What does it mean if `--cov-report=term-missing` shows a file at 0% coverage?
  7. What is the purpose of installing pytest-cov, given that coverage.py could be run standalone via `coverage run -m pytest`?
  8. What is the relationship between pytest-cov and coverage.py?
  9. What is a `.coveragerc` (or `[tool.coverage.run]` in `pyproject.toml`) file used for?
  10. What does "line coverage" measure?
  11. What is the basic command to run tests with coverage reporting via pytest-cov?
  12. 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?
Gaps to close?
Read the curated pytest-cov notes — core concepts, patterns, interview prep.
pytest-cov notes

More quizzes

.NET.NET MAUIAbsintheAccessibilityActixActix Web