Complete the code to start coverage measurement in a Flask app test.
import coverage cov = coverage.[1]() cov.start()
The Coverage() class from the coverage module is used to create a coverage object.
Complete the code to stop coverage measurement and save the report.
cov.stop()
cov.[1]()After stopping coverage, save() writes the collected data to disk.
Fix the error in generating an HTML coverage report.
cov.[1](directory='coverage_html_report')
The correct method to generate an HTML report is html_report().
Fill both blanks to create a coverage report for specific files and omit tests.
cov = coverage.Coverage(source=[[1]], omit=[[2]])
The source parameter specifies the app folder, and omit excludes test files.
Fill all three blanks to correctly configure coverage to start, stop, and save in a Flask test setup.
cov = coverage.[1](branch=True) cov.[2]() # run tests cov.[3]()
Create a coverage object with Coverage(), then start() before tests, and stop() after tests.
