Bird
0
0

Which command correctly generates an HTML coverage report after running tests?

easy📝 Syntax Q3 of 15
Flask - Testing Flask Applications
Which command correctly generates an HTML coverage report after running tests?
Acoverage run html
Bcoverage html
Cpytest coverage html
Dcoverage report --html
Step-by-Step Solution
Solution:
  1. Step 1: Recall coverage commands

    After running tests with coverage run, use 'coverage html' to create HTML reports.
  2. Step 2: Eliminate incorrect syntax

    'coverage run html' incorrectly combines execution and reporting, 'pytest coverage html' and 'coverage report --html' use non-standard syntax.
  3. Final Answer:

    coverage html -> Option B
  4. Quick Check:

    HTML report command = coverage html [OK]
Quick Trick: Use 'coverage html' to generate HTML reports after tests [OK]
Common Mistakes:
MISTAKES
  • Mixing command order or flags
  • Using pytest directly for coverage HTML
  • Adding unsupported flags like --html

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Flask Quizzes