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
-
1What is the command you used to run your tests with coverage?Derek Kwok– Derek Kwok2016-02-03 04:59:30 +00:00Commented Feb 3, 2016 at 4:59
-
stackoverflow.com/questions/18573542/…hussain– hussain2016-02-03 05:04:29 +00:00Commented Feb 3, 2016 at 5:04
-
I used coverage run --source='.' manage.py testAndie Rabino– Andie Rabino2016-02-03 06:18:10 +00:00Commented Feb 3, 2016 at 6:18
-
Does this answer your question? Coverage.py warning: No data was collected. (no-data-collected)louis_guitton– louis_guitton2020-03-07 15:29:22 +00:00Commented Mar 7, 2020 at 15:29
Add a comment
|
1 Answer
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.