Complete the code to install pytest-cov using pip.
pip install [1]You need to install pytest-cov to enable coverage reporting with pytest.
Complete the pytest command to run tests with coverage report in terminal.
pytest --cov=[1]The --cov option should point to the package or module you want coverage for, usually your main code folder like my_package.
Fix the error in the pytest command to generate an HTML coverage report.
pytest --cov=my_package --cov-report=[1]To generate an HTML coverage report, use --cov-report=html.
Fill both blanks to add coverage options in pytest.ini configuration file.
[pytest] addopts = --cov=[1] --cov-report=[2]
In pytest.ini, addopts can include --cov=my_package to specify coverage target and --cov-report=term-missing to show missing lines in terminal.
Fill all three blanks to ignore test files and enable coverage for source code in setup.cfg.
[tool:pytest] addopts = --cov=[1] --cov-report=[2] --cov-fail-under=[3]
In setup.cfg, --cov=src targets source code, --cov-report=term shows coverage in terminal, and --cov-fail-under=80 fails tests if coverage is below 80%.