Re: Pitfall: mxODBCZopeDA and test runner in 2.9+

Chris Withers <[email protected]>
Newsgroups gmane.comp.web.zope.database
Message-ID <[email protected]>
M.-A. Lemburg wrote:
>> 3. decide it really should have been mybar.py
> 
> I suppose you are doing 'mv myfoo.py mybar.py' here ...
> 
>> 4. delete myfoo.py
> 
> ... then this should be 'rm myfoo.py*' to get rid off the
> old PYC files.

Indeed...
>> 5. run unit tests to make sure you've fixed all import statements
> 
> That's a weird way to check your code. You should really
> do a grep on the sources to see whether any references
> to the 'myfoo' module are still left.

Nah, that just means you're too lazy to get decent test coverage ;-)

> code quality or to find hidden imports, unless you have 100%
> code coverage and are able to test all possible combinations
> of execution paths, which is unlikely :-)

Actually, no. Code coverage by unit tests on projects I work with is 
pretty high...

>> 7. get errors on fresh checkout because unit tests were using mybar.pyc
> 
> I still have a feeling that your trying to work around developer
> laziness here ;-)

Agreed. I always use -k to the testrunner, but I'm just explaining why 
people are having the problems they are...

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.