nose icon indicating copy to clipboard operation
nose copied to clipboard

cover plugin fails to accurately report coverage if modules are never imported

Open thanatos opened this issue 7 years ago • 1 comments

The cover plugin will omit files that never get imported from the coverage report entirely. Further, when it computes the % of code covered by unit tests, these files are omitted altogether, resulting in a much higher "% covered" than what the actual reality is.

Essentially, this problem exists because the plugin insists on passing a list of modules to html_report(), seen here.

The list of modules is computed here

Simply passing None to the first argument of html_report results in the correct output.

thanatos avatar Jun 09 '17 21:06 thanatos

I have the same problem and I would not like to import every module in order to have them in the report. Is there any workaround?

GuillemGSubies avatar Sep 03 '18 09:09 GuillemGSubies