[Zope-CMF] Re: CachingPolicyManager improvements

Florent Guillaume fg at nuxeo.com
Fri Sep 9 10:54:42 EDT 2005


On 9 Sep 2005, at 16:48, 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).

This is painful when tests are run by hand, but also buy a buildbot  
for instance, because if the tests are slow you have much worse  
granularity for the reports.

>   - 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"
>     bookkeeping.

Also because you have to know how the fixtures work to understand the  
tests. I'd rather have something a bit more verbose with explicit  
instantiation of fake tools than having to hunt in 3 base classes  
what methods are called, when debugging a test.

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   fg at nuxeo.com




More information about the Zope-CMF mailing list