[TIP] Declarative style acceptance tests (was: Using doctest for functional tests / user stories)

Paul Moore p.f.moore at gmail.com
Mon Jan 6 14:29:16 PST 2014


On 6 January 2014 22:10, Barry Warsaw <barry at python.org> wrote:
> Also, doctests out of the box need some help.  I have my own hacks on top of
> stdlib, and I've been meaning to look at dutest for a while.
>
> Here's Mailman's doctest integration with nose2:
>
>     http://tinyurl.com/l2trn4a
>
> and my setup of globals for doctests (which I really try to keep to a minimum
> - it's a balance between magic and readability):
>
>     http://tinyurl.com/k5ecy2u
>
> Here is a pretty good example doctest[1].
>
>     http://tinyurl.com/pbx2kqw

Wow! Thanks for this - it's quite impressive (and a little scary...) I
notice that the test uses a service at http://localhost:9001/3.0/lists
and I can't find the code that sets this up. That's not really
important, but it *does* indicate to me that things can get
complicated pretty quickly with doctest (which is more or less what
people have been telling me). I'm not entirely sure I want my little
application to end up with more test support code than application
code :-)

Paul



More information about the testing-in-python mailing list