[Zope-dev] Why I dislike narrative doctests
Marius Gedminas
mgedmin at b4net.lt
Wed Apr 23 16:47:09 EDT 2008
On Wed, Apr 23, 2008 at 05:22:29PM -0300, Sidnei da Silva wrote:
> Can't you start a plain-old unittests module and stick your test in
> there? Is there any rule that says you cannot create a plain-old test
> module if the project you are fixing the bug in uses doctests?
I'll probably do that (since I sort of took over the maintainership of
zope.testing a while ago). The point of my message was not to whine
about the state of zope.testing, but to present a new argument against
the current fashion of using plain-text narrative doctests for
everything.
These are very fine when you initially write them, but a pain when you
come back a year later and need to modify them.
Trying to kill two birds with one stone (i.e. have narrative doctests
serve both as documentation and as the test suite) doesn't seem to work:
* users complain about boring corner cases and irrelevant test
fixtures in what they expected to be documentation
* programmers complain about narratives being too hard to modify
Marius Gedminas
--
You can't spell evil without vi.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20080423/3b16d30c/attachment.bin
More information about the Zope-Dev
mailing list