[Zope3-dev] zope.testing.testrunner: issue with remove_stale_bytecode

Paul Winkler pw_lists at slinkp.com
Tue Oct 10 22:28:16 EDT 2006


On Tue, Oct 10, 2006 at 08:13:23PM -0400, Jim Fulton wrote:
> Paul Winkler wrote:
> >Posting this here because the code in question lives in zope.testing...
> >
> >After accidentally nuking my mxODBCZopeDA installation simply by running
> >"bin/zopectl test" in a zope 2.9 instance, I quickly concluded:
> >There is no "bug". testrunner.py is behaving exactly as designed.  Stale
> >bytecode causes "spurious test failures due to finding compiled modules
> >where source modules have been deleted." Therefore, we should delete it
> >by default.
> >
> >But this conflicts with third parties being able to deliver bytecode
> >instead of source, which is a standard python feature (if not common in
> >the zope world). Since we can't tell the difference between "stale" and
> >"we never had source in the first place", deleting bytecode is arguably
> >surprising and overly invasive.
> >
> >I guess it comes down to choosing the lesser of two evils.  Which is
> >worse? Confusing test errors caused by stale bytecode, or a test run
> >having the power to break your instance with the default options?
> >I don't see a third path.
> >
> >ideas? opinions?
> >
> 
> See: http://www.python.org/pypi/zope.testing#running-without-source-code

Thanks for the pointer.
AFAICT the current docs confirm my understanding.
--usecompiled would be useful if I wanted to run tests in a
package for which I didn't have source. That's not the case here.
All I need is -k,  --keepbytecode.

I think the current default behavior sucks, but I think changing it
would just suck differently :-(
 
-- 

Paul Winkler
http://www.slinkp.com


More information about the Zope3-dev mailing list