-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Rocky Burt wrote: > On Wed, 2006-27-12 at 11:46 +0100, Jens Vagelpohl wrote: >> P.S.: I _hate hate hate_ doctests ;) > > Why?
I won't speak for Jens, but I find they have two serious drawbacks when used as *unit tests* (as opposted to quasi-functional tests with narrative): - Tests dont run in isolation from one another (this is why I say quasi-functional). - The contortions required to get testable output printed often obscure the intent of the test itself. I prefer a unit test module with many tests, each *exteremely short*, with each test covering exactly *one* of the permutations of the state which triggers the behavior-under-tset. The name of the test case method can then serve to document the intent. I try to keep those tests short by factoring "setup" code out into helper methods. Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 [EMAIL PROTECTED] Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFko5p+gerLs4ltQ4RAnk5AKCRXF2TvZzhb+NtVQYAck2SPrbHoACgnMss PNAd3LQ6sCey3CRTaV+2zZM= =FO6M -----END PGP SIGNATURE----- _______________________________________________ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests