doctest, unittest, or if __name__='__main__'
cito at online.de
Tue Mar 21 22:26:57 CET 2006
john_sips_tea at yahoo.com wrote:
> If unittest is the standard way to write test code, why do we still
> have doctest? (I notice there's no mention in PEP 3000 of deprecating
> the doctest module).
Because both have their pros and cons and their right to exist. Doctest
is really easy to use and you can kill two birds with one stone.
Rather than removing one of the two, I would like to see yet another
alternatise such as py.test in the standard lib, because unittest is
indeed standard, but clumsy and un-pythonic.
More information about the Python-list