[TIP] Fwd: Declarative style acceptance tests (was: Using doctest for functional tests / user stories)
olemis at gmail.com
Mon Jan 6 15:07:35 PST 2014
---------- Forwarded message ----------
From: Olemis Lang <olemis at gmail.com>
Date: Mon, Jan 6, 2014 at 6:05 PM
Subject: Re: [TIP] Declarative style acceptance tests (was: Using doctest
for functional tests / user stories)
To: Barry Warsaw <barry at python.org>
On Mon, Jan 6, 2014 at 5:10 PM, Barry Warsaw <barry at python.org> wrote:
> These days I write all my documentation using doctest/reST, but I try to
> to good paths and recommended usage. Doctests don't work as well for
> all code paths,
> and while I occasionally document tracebacks, I think testing
> the bad paths in your code tend to work better in unittests.
+1 ... these are the two weaknesses I'd emphasize the most regarding
In real case scenarios with conditional statements and exceptional paths I
need to track , I tend to rely on :
- (dutest) __tc__.assert* methods instead .
- Design test scenario for individual execution paths i.e. no (or a few)
p.s. otoh , something I really like about unittest is assertRaises as
context manager , again , also available using (dutest) __tc__ .
Olemis - @olemislc
Apache™ Bloodhound contributor
Blog ES: http://simelo-es.blogspot.com/
Blog EN: http://simelo-en.blogspot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the testing-in-python