Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Coverage.py warning: No data was collected

I am having problem on testing my django application. It passes all the tests but coverage.py doesn't give any report about the coverage. Any luck on this? Thanks

like image 969
Andie Rabino Avatar asked Feb 03 '16 04:02

Andie Rabino


1 Answers

The coverage docs say the following:

“No data was collected (no-data-collected)”

Coverage.py ran your program, but didn’t measure any lines as executed. This could be because you asked to measure only modules that never ran, or for other reasons.

That means that your config needs some tweaking. In my case I forgot to glob the directory I specified in my .coveragerc:

[run]
include = my_app/*

Have a look at the command you're running the tests with and your config files. There may be some directives working against each other.

like image 77
jnns Avatar answered Oct 22 '22 07:10

jnns