[Zope-DB] Pitfall: mxODBCZopeDA and test runner in 2.9+

Chris Withers chris at simplistix.co.uk
Fri Oct 13 05:14:32 EDT 2006


M.-A. Lemburg wrote:
>> If you fail to use -k, the zope test runner will delete bytecode for all
>> your products - including mxODBCZopeDA, which has no .py files to fall
>> back on.  Ouch. I'll investigate further - there might be a bug to file
>> against zope.testing.
> 
> Why does the test runner delete .pyc files in directories it
> doesn't own ?

The common case used to be:

1. run tests in a checkout (generates .pyc's for each .py file imported)

2. svn up, which deletes a load of .py files

3. re-run tests, curse and swear that there are still .pyc files lying
    around that got imported, and you only noticed when your production
    environment broke, because you rebuild that out from scratch on
    upgrade

...so the "autho-pyc-destructor" was built ;-)

I have to echo Jens' sentiments though: why not just ship .py files and 
be done with it?

cheers,

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk



More information about the Zope-DB mailing list