pytest-cov

A pytest plugin that runs coverage.py during the test run and prints a coverage report at the end.

In more detail

The --cov option names the code to measure and --cov-report=term-missing adds a Missing column listing the line numbers that never ran. The plugin shows up in the plugins line of the pytest session header.

Example

pytest -q --cov=refund --cov-report=term-missing

Related terms

Taught in

References