[TIP] Test Driven Development

Michał Kwiatkowski constant.beta at gmail.com
Sun Mar 4 11:40:29 PST 2007


On 3/3/07, Michael Foord <fuzzyman at voidspace.org.uk> wrote:
> I'm interested in how many people on this list are doing test driven
> development ?

I tend to use TDD with doctests and TED (mentioned by Grig) with
unittest. For some reason doctest is so easy to set up that I can
define a behaviour and API for a function/method without thinking
about it. Unittests usually require some mock-shmock-setup-ing, so I
usually implement the function, test it manually and write automated
test for it later (or never :( ). In some sense doctest encourages me
to do the right thing, so it is probably better tool than unittest (of
course YMMV).

I try to unit test most of the code and write functional tests when I
really need them (i.e. things which unit tests won't catch).

Cheers,
mk



More information about the testing-in-python mailing list