[Zope3-Users] Re: [Zope] Debugging doctests

Chris McDonough chrism at plope.com
Thu Feb 23 13:49:52 EST 2006

On Feb 23, 2006, at 1:17 PM, Benji York wrote:

> Chris McDonough wrote:
>> I dunno about sucking because they are quite good for  
>> documentation,  but I tend to write plain-old unittests instead of  
>> doctests when I'm  testing without any pretense towards writing  
>> documentation.  If you  test internals of a class in a doctest,  
>> the doctest body gets pretty  cluttered, which tends to defeat the  
>> documentation-esque-ness of them.
> Are you talking about doctests in docstrings?  If so, I definitely  
> see downsides to that use case.  I was talking about doctests in  
> stand-alone text files.  That's my (and several others) preferred  
> way of using them.


> If you /were/ talking about stand-alone doctests, then I have no  
> idea what you're talking about. :)

It's just opinion, but for example, I don't think zope/wfmc/xpdl.txt  
reads much better as a doctest than it would as a plain old  
unittest.  But it's of course a judgment call.

- C

More information about the Zope mailing list