Add 'overall' report option: single percentage number.

#5 Open

Bitbucket cannot automatically merge this request.

The commits that make up this pull request have been removed.

Bitbucket cannot automatically merge this request due to conflicts.

Review the conflicts on the Overview tab. You can then either decline the request or merge it manually on your local system using the following commands:

hg update 
hg pull -r default
  1. Carl Meyer

I use pytest-cov, and I needed a reporting option to report simply the overall coverage percentage to the terminal at the end of a test run. The normal terminal reports are too long on my project, since they list every covered module on its own line, and this means I have to scroll up to see details on test failures, which is irritating. But I do want immediate feedback on the terminal on the overall coverage percentage, so that I know immediately if it's dropped below 100% (and then I can go check the HTML report for details).

Fortunately this is quite easy to implement, as already returns the overall percentage as a float; it just requires adding a new option for cov_report. In this PR I've named this option "overall" but I am not attached to the name and will happily change it to whatever you like.

If this PR is accepted I will supply a matching PR for pytest-cov to add this as one of the choices for the --cov-report option.

Comments (0)