[Zope-dev] Re: zope.sendmail Retry fixes and new state machine.

Jens Vagelpohl jens at dataflake.org
Mon Mar 10 13:06:33 EDT 2008


On Mar 10, 2008, at 17:57 , Wichert Akkerman wrote:

> Previously Tres Seaver wrote:
>> Gary Poster wrote:
>>> Also, some variety of doctest would be nice.  Even when a package is
>>> not using doctests, I add new tests as doctest unless there's a  
>>> really
>>> good reason not to.
>>
>> Becuase they make for poor unit tests?  Using them to document the
>> "mainline" use cases for an API is one thing:  using them to do  
>> thorough
>> coverage of edge cases is quite another. I find that for the latter,
>> they fail *both* as documentation *and* as tests:  their value as
>> documentation drops as the amount of scaffoldiing rises, and the  
>> lack of
>> isolation between tests sharply reduces their value for testing the  
>> corners.
>>
>> I realize I have said this before, but then others keep urging the
>> "doctests everywhere" meme.
>
> Indeed, and for that reason this can't be said enough. Doctests are
> useful to create testable documentation. They are not the right tool  
> to
> create isolated, debuggable tests.

Amen to that. Doctests are a useful testing tool, but no single tool  
can fit every situation.

jens





More information about the Zope-Dev mailing list