[Zope-DB] Pitfall: mxODBCZopeDA and test runner in 2.9+
Chris Withers
chris at simplistix.co.uk
Fri Oct 20 04:36:18 EDT 2006
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
More information about the Zope-DB
mailing list