test coverage doesn't report any data
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nova-dpm |
Fix Released
|
Undecided
|
Tin Lam |
Bug Description
Description
===========
We cannot create a test coverage report with the tox test env "cover"
Steps to reproduce
==================
$ git clone https:/
$ cd nova-dpm
$ tox -e cover
Expected result
===============
A test coverage report gets created.
Actual result
=============
No coverage report, but warnings instead:
Coverage.py warning: Module nova-dpm was never imported.
Coverage.py warning: No data was collected.
Ran 10 tests in 9.215s (-0.482s)
PASSED (id=9)
No data to report.
Environment
===========
$ git log --oneline -1
6f87677 Instance Destroy,
Logs & Configs
==============
$ tox -e cover
cover installed: [...]
Coverage.py warning: Module nova-dpm was never imported.
Coverage.py warning: No data was collected.
Coverage.py warning: Module nova-dpm was never imported.
Coverage.py warning: No data was collected.
Coverage.py warning: Module nova-dpm was never imported.
Coverage.py warning: No data was collected.
Coverage.py warning: Module nova-dpm was never imported.
Coverage.py warning: No data was collected.
Coverage.py warning: Module nova-dpm was never imported.
Coverage.py warning: No data was collected.
Coverage.py warning: Module nova-dpm was never imported.
Coverage.py warning: No data was collected.
Coverage.py warning: Module nova-dpm was never imported.
Coverage.py warning: No data was collected.
Coverage.py warning: Module nova-dpm was never imported.
Coverage.py warning: No data was collected.
Ran 10 tests in 9.215s (-0.482s)
PASSED (id=9)
No data to report.
Changed in nova-dpm: | |
assignee: | nobody → Markus Zoeller (markus_z) (mzoeller) |
Changed in nova-dpm: | |
assignee: | Markus Zoeller (markus_z) (mzoeller) → nobody |
It has to be something with the paths in the tox configuration ("tox.ini") or coverage configuration (".coverage.rc"). I can do this to create results:
$ git clone https:/ /github. com/openstack/ nova-dpm bin/activate
$ cd nova-dpm
$ tox -e cover
$ source .tox/cover/
$ (cover) coverage run --source=nova_dpm -m unittest discover -s nova_dpm/tests/
$ (cover) coverage report