[Zope-dev] RFC: Proposed new style for documenting and testing ZTK packages

Lennart Regebro regebro at gmail.com
Mon Apr 19 10:06:08 EDT 2010


On Mon, Apr 19, 2010 at 16:03, Lennart Regebro <regebro at gmail.com> wrote:
> On Mon, Apr 19, 2010 at 15:48, Marius Gedminas <marius at gedmin.as> wrote:
>> If you've the discipline to keep the doctests short, I don't see why you
>> shouldn't continue writing them instead of unit tests
>
> Because they are a bitch to debug, relies on details of output, which
> makes them brittle, hard to port to Python 3, and can be tricky to set
> up with loads of subtle things like inheriting the environment from
> where the DocTest was created, etc.

And from __future__ imports doesn't work. And.. I'm sure I'm gonna
remember more reason why doctests are bad later, but I can't be
bothered really. Just don't use them unless you are writing
documentation. PLEASE!

-- 
Lennart Regebro: Python, Zope, Plone, Grok
http://regebro.wordpress.com/
+33 661 58 14 64


More information about the Zope-Dev mailing list