Audience
Developers interested in a solution to produce coverage reports and manage their code
About pytest-cov
This plugin produces coverage reports. Compared to just using coverage run this plugin does some extras. Subprocess support, so you can fork or run stuff in a subprocess and will get covered without any fuss. Xdist support, so you can use all of pytest-xdist’s features and still get coverage. Consistent pytest behavior. All features offered by the coverage package should work, either through pytest-cov’s command line options or through coverage’s config file. Under certain scenarios, a stray .pth file may be left around in site packages. The data file is erased at the beginning of testing to ensure clean data for each test run. If you need to combine the coverage of several test runs you can use the --cov-append option to append this coverage data to coverage data from previous test runs. The data file is left at the end of testing so that it is possible to use normal coverage tools to examine it.