[Zope-CMF] Re: CachingPolicyManager improvements
chris at simplistix.co.uk
Wed Sep 14 02:32:11 EDT 2005
Tres Seaver wrote:
> Note that the goal with unit tests is to use the *smallest possible
> fixture*; using PortalTestCase when you could equally well use
> RequestTest reduces the usefulness of the test:
> - it runs slower (the "nibbled to death by ducks" effect, particularly
> when re-running the tests frequently, as we all should).
> - it may mask undesirable dependencies (CMFCore is not supposed to
> depend on CMFDefault, for instance, even in testing).
> - it *may* make the tests themselves obscure, because the actual
> behavior being tested is tied up in lots of "extraneous"
Hear, hear! (to all of the above)
I spent a lot of time long ago making sure CMF had UNIT as opposed to
functional tests. PortalPloneTestCase doesn't even try, thanks to the
massive dependencies that Plone introduces, so you end up trying to run
functional tests all the time which is just too slow. Ask Jens about the
project we both work on that now has about 700 tests base on
PloneTestCase and how pitifully slow it is, and how we spend a lot of
time tracking down problems caused by the huge overhead to having to get
Plone fixtures set up "just right" so that nothing explodes to often...
Simplistix - Content Management, Zope & Python Consulting
More information about the Zope-CMF