Commands

When you install coverage.py, a command called coverage is installed for command-line use. It has a number of commands:

Global options

Help is available with the help command, or with the --help switch on any other command:

$ coverage help
$ coverage help run
$ coverage run --help

Version information for coverage.py can be displayed with coverage --version:

$ coverage --version
Coverage.py, version 7.13.5 with C extension
Documentation at https://coverage.readthedocs.io/en/7.13.5

Any command can use a configuration file by specifying it with the --rcfile=FILE command-line switch. Any option you can set on the command line can also be set in the configuration file. This can be a better way to control coverage.py since the configuration file can be checked into source control, and can provide options that other invocation techniques (like test runner plugins) may not offer. See Configuration reference for more details.

For diagnosing problems, commands accept a --debug option. See --debug option.

Commands

The details of each command are on these pages: