[TIP] tox & pytest-cov
Tom Viner
tom at viner.tv
Thu Mar 5 03:19:13 PST 2015
Hi,
I've got a super simple package here: https://github.com/tomviner/my_package
And I can't see how to get both:
- working coverage
- correct paths reported in my coverage output (terminal or xml etc)
calling py.test directly works fine:
$ py.test --cov src/my_package
...
src/my_package/__init__ 2 0 100%
But with tox, I can get either correct 100% coverage report, OR a sensible
path.
$ tox '--cov src/my_package'
...
src/my_package/__init__ 2 2 0%
$ tox '--cov my_package'
...
.tox/py27/lib/python2.7/site-packages/my_package/__init__ 2 0
100%
The paths are actually really important because Jenkins tooling will link
up coloured source files from an xml report.
Is this a tox issue or a pytest-cov issue?
Many thanks,
Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20150305/ee1bbe13/attachment.html>
More information about the testing-in-python
mailing list