[TIP] [tox] Stale pyc files causing false positive test successes
Alexander O'Donovan-Jones
Alexander at ccpgames.com
Sun Oct 14 09:57:09 PDT 2012
If you're having problems with pyc files you might want to look into this: http://docs.python.org/using/cmdline.html#envvar-PYTHONDONTWRITEBYTECODE
________________________________
From: testing-in-python-bounces at lists.idyll.org [testing-in-python-bounces at lists.idyll.org] on behalf of Laurens Van Houtven [_ at lvh.cc]
Sent: 14 October 2012 15:39
To: Testing in Python
Subject: [TIP] [tox] Stale pyc files causing false positive test successes
Hi guys,
I'm generally a pretty happy tox user, but recently I ran into something that appears to have generated a false positive. Apparently I misunderstand how tox works, because I figured this wouldn't be possible...
Anyway, I removed a package (both the directory, the __init__.py and the module inside of it), re-ran the tests, and it worked fine. Later, when actually trying to run the code in the venv, it broke -- there was still something relying on importing that package but the tests didn't catch it.
I honestly have no idea whatsoever how this happened. It's the first time I've seen this behavior, despite it not being the first package I pruned.
I guess the way to fix this is by recreating the environment? That seems to have fixed the issue. I guess maybe in doing so I've also nuked any possibility of further diagnosing the problem; hopefully the above recollection is enough to ring a bell somewhere.
cheers
lvh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20121014/ea2f0ac9/attachment.htm>
More information about the testing-in-python
mailing list