I am trying to find the coverage using coverage module for a django project but gets
Coverage.py warning: No data was collected. (no-data-collected)
My project folder has src and tests folders.
When I run
coverage run -m pytest && coverage report
It produces a report with 100% coverage with the list of files inside the tests folder. Whereas when I run
coverage run --source=src -m pytest && coverage report
it says
Coverage.py warning: No data was collected. (no-data-collected)
No data to report.
When I try to give the source=src
or include=src
in the .coveragerc
also the same warning occurs. The tests passes for all the above cases.
I want the coverage of the src folder. Is it because I am missing some path setting?