<div class="gmail_quote">On Tue, Oct 16, 2012 at 8:49 AM, holger krekel <span dir="ltr"><<a href="mailto:holger@merlinux.eu" target="_blank">holger@merlinux.eu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hey Laurens,<br>
<div class="im"><br>
On Sun, Oct 14, 2012 at 17:39 +0200, Laurens Van Houtven wrote:<br>
> Hi guys,<br>
><br>
><br>
> I'm generally a pretty happy tox user, but recently I ran into something<br>
> that appears to have generated a false positive. Apparently I misunderstand<br>
> how tox works, because I figured this wouldn't be possible...<br>
><br>
> Anyway, I removed a package (both the directory, the __init__.py and the<br>
> module inside of it), re-ran the tests,<br>
<br>
</div>Did you re-run tox or tests directly in your own venv?<br>
Tox would actually sdist-package your project and i assume this<br>
should usually fail if a package is missing. Or did you also remove<br>
it from setup.py?<br><div class="im"></div></blockquote><div><br>Right, so, the issue was that it was a package, and it was still mentioned in setup.py. Clearly an issue of PEBKAC, but I was expecting it to bomb out more loudly?<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
> and it worked fine. Later, when<br>
> actually trying to run the code in the venv, it broke --<br>
<br>
</div>you invoked some .tox/*/bin/... i assume.<br></blockquote><div><br>Yep.<br> <br> coverage run \<br> {envdir}/bin/trial --temp-directory={envdir}/_trial {posargs:myprojname}<br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
> there was still<br>
> something relying on importing that package but the tests didn't catch it.<br>
<br>
</div>If you used tox above then that is indeed strange.<br>
<div class="im"><br>
> I honestly have no idea whatsoever how this happened. It's the first time<br>
> I've seen this behavior, despite it not being the first package I pruned.<br>
><br>
> I guess the way to fix this is by recreating the environment? That seems to<br>
> have fixed the issue. I guess maybe in doing so I've also nuked any<br>
> possibility of further diagnosing the problem; hopefully the above<br>
> recollection is enough to ring a bell somewhere.<br>
<br>
</div>--recreate is a good idea for a "does it really work" check<br>
when deleting files / dirs i think because without it we rely on<br>
distribute/distutils mechanics to do the proper thing when<br>
re-installing a package including pyc file handling. For my quick<br>
experiment it worked fine, however.<br>
<br>
best,<br>
holger<br>
</blockquote></div><br clear="all"><br>-- <br>cheers<div>lvh</div><br>