nose
nose copied to clipboard
cover plugin fails to accurately report coverage if modules are never imported
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.
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?