unit test for a printing method

Fredrik Lundh fredrik at pythonware.com
Tue Aug 29 06:42:01 EDT 2006


"noro" wrote:

>> why are you trying to reinvent doctest ?
>
> it was my understanding that "doctest" is intented to test the little
> examples in a function/class documention, do people use it for more
> then that, i.e - do an extentive output testing for thier apps?

yes (by using doctest to test the test programs, rather than the individual
modules).

doctest is a lot more agile than traditional unittest development -- mostly
because instead of having to write both the test code and the expected
result, you just write good test code, run the tests, and verifies the output
manually before pasting it into your test script.  use your energy to come
up with good tests, not to deal with framework artifacts.

</F> 






More information about the Python-list mailing list