[TIP] tox and coverage across multiple envs

Ned Batchelder ned at nedbatchelder.com
Tue Aug 9 17:32:24 PDT 2011


On 8/9/2011 4:20 AM, Andrew Dalke wrote:
> I tried to generate coverage for each environment using:
>
>
> commands=
> coverage run -p ./tests/unit2 discover -s tests
>
>
> followed by the usual "coverage combine" / "coverage html".
>
> This did not work as I wanted. I got coverage information
> with names to each of the modules, as in:
>
> .tox/py27-oe174/lib/python2.7/site-packages/chemfp/openbabel
> .tox/py27-ob23svn1/lib/python2.7/site-packages/chemfp/openbabel
> .tox/py27-ob223/lib/python2.7/site-packages/chemfp/openbabel
> .tox/py26-rd201106/lib/python2.6/site-packages/chemfp/openbabel
>
>
> I wanted coverage for all of the chemfp/openbabel.py
> files merged into one.
>
> Is there any way to do what I want?
I don't understand what those file names are that you're showing.  You 
should have gotten data files like .coverage.machine.pid.12345 .  And 
then "coverage combine" should have created a single .coverage file from 
them.  I'm not familiar with tox, is there something it does to affect 
the coverage collection?

--Ned.



More information about the testing-in-python mailing list