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

Paul Moore p.f.moore at gmail.com
Mon Jan 6 15:36:39 PST 2014


On 6 January 2014 23:19, Michael Foord <fuzzyman at voidspace.org.uk> wrote:
> think code duplication matters a lot less in tests than it does in production code. You tend to refactor tests less (note I didn't say that you never refactor tests...) and you want each test to be fairly "self explanatory". You can still use abstraction to reduce duplication and increase readability of course.
>
> For example, if you want a more narrative style of test:
[...]

Thanks for this, and to all who have offered suggestions and
explanations. It's been very enlightening. I'll sleep on it for now,
and have a look at where I go next with my tests and application in
the morning.

Obviously, any further comments will also be gratefully received, as well :-)

Paul



More information about the testing-in-python mailing list