<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
On 11/12/14 5:15 PM, Barry Warsaw wrote:<br>
<blockquote cite="mid:20141112171526.03617b6e@anarchist.wooz.org"
type="cite">
<pre wrap="">I wonder if anything can or should be done to make tox and coverage work
better together. In particular, I have to add some icky and fragile code to
my coverage.ini to get reasonable results from a `tox -e coverage` run.
-----snip snip-----
[run]
branch = true
parallel = true
omit =
setup*
*/showme.py
.tox/coverage/lib/python2.7/site-packages/*
[paths]
source =
mailman
.tox/coverage/lib/python*/site-packages/mailman
-----snip snip-----
I don't like having to equivalence the in-tree directory ('mailman') with the
tox venv site-packages directory, but this is necessary because some tests run
from executables created in the venv. I'd like for coverage to do the [paths]
bits automatically when it detects its running under tox.</pre>
</blockquote>
<br>
If I understand you correctly, this would require coverage to
automatically understand that .../site-packages/mailman is your own
code. I don't see how it could do that.<br>
<blockquote cite="mid:20141112171526.03617b6e@anarchist.wooz.org"
type="cite">
<pre wrap="">
I also don't like having to explicitly omit everything else in the tox venv's
site-packages. It seems like since coverage already omits stuff in the
system's site-packages, it could do the same with the tox venv site-packages.</pre>
</blockquote>
<br>
Usually the best way to omit things from site-packages is to use the
--source=. (or some other value) setting. In your case, it looks
like it would be:<br>
<br>
[run]<br>
source =<br>
.<br>
.tox/coverage/lib/python*/site-packages/mailman<br>
<br>
Would that work?<br>
<br>
<blockquote cite="mid:20141112171526.03617b6e@anarchist.wooz.org"
type="cite">
<pre wrap="">
Cheers,
-Barry
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
testing-in-python mailing list
<a class="moz-txt-link-abbreviated" href="mailto:testing-in-python@lists.idyll.org">testing-in-python@lists.idyll.org</a>
<a class="moz-txt-link-freetext" href="http://lists.idyll.org/listinfo/testing-in-python">http://lists.idyll.org/listinfo/testing-in-python</a>
</pre>
</blockquote>
<br>
</body>
</html>