Complete the code to run pytest with coverage and show the report in the terminal.
pytest --cov=my_package --cov-report=[1]The term option shows the coverage report directly in the terminal after tests run.
Complete the code to generate an HTML coverage report in the 'coverage_html' folder.
pytest --cov=my_package --cov-report=[1]:coverage_htmlThe html option generates a detailed HTML report in the specified folder.
Fix the error in the code to generate an XML coverage report named 'coverage.xml'.
pytest --cov=my_package --cov-report=[1]:coverage.xmlThe xml option generates an XML report file, commonly named coverage.xml.
Fill both blanks to generate terminal and HTML coverage reports simultaneously.
pytest --cov=my_package --cov-report=[1] --cov-report=[2]:htmlcov
Use term for terminal output and html for HTML report folder.
Fill all three blanks to generate terminal, HTML, and XML coverage reports.
pytest --cov=my_package --cov-report=[1] --cov-report=[2]:htmlcov --cov-report=[3]:coverage.xml
This command generates coverage reports in terminal, HTML folder, and XML file formats.