[Python-ideas] doctest

Ian Bicking ianb at colorstudy.com
Sat Feb 18 05:24:10 CET 2012

On Feb 17, 2012 4:12 PM, "Nick Coghlan" <ncoghlan at gmail.com> wrote:
> On Sat, Feb 18, 2012 at 7:57 AM, Mark Janssen <dreamingforward at gmail.com>
> > Anyway... of course patches welcome, yes...  ;^)
> Not really. doctest is for *testing code example in docs*. If you try
> to use it for more than that, it's likely to drive you up the wall, so
> proposals to make it more than it is usually don't get a great
> reception (docs patches to make it's limitations clearer are generally
> welcome, though). The stdib solution for test driven development is
> unittest (the vast majority of our own regression suite is written
> that way - only a small proportion uses doctest).

This pessimistic attitude is why doctest is challenging to work with at
times, not anything to do with doctest's actual model.  The constant
criticisms of doctest keep contributors away, and keep its many resolvable
problems from being resolved.

> An interesting third party alternative that has been created recently
> is behave: http://crate.io/packages/behave/

This style of test is why it's so sad that doctest is ignored and
unmaintained.  It's based on testing patterns developed by people who care
to promote what they are doing, but I'm of the strong opinion that they are
inferior to doctest.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20120217/27821cf1/attachment.html>

More information about the Python-ideas mailing list