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,
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"
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 Guillaume, Nuxeo (Paris, France) CTO, Director of R&D
+33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED]
Zope-CMF maillist - Zope-CMF@lists.zope.org
See http://collector.zope.org/CMF for bug reports and feature requests