On Tue, 21 Mar 2006 22:26:57 +0100 Christoph Zwerschke <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] 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.
e.g.... Doctest is very easy to use, so it's easy to ensure that tests get written. OTOH, they're only really good for stuff that can be easily tested in the interpreter (e.g. that can be easily verified from their text output). When you get into stickier stuff like graphics and web programming, the formal structure of pyunit can be easier to adapt than something which is intrinsically based on string processing. Haven't seen py.test before, but I'm looking now -- thanks for the link. :-) Cheers, Terry -- Terry Hancock ([EMAIL PROTECTED]) Anansi Spaceworks http://www.AnansiSpaceworks.com -- http://mail.python.org/mailman/listinfo/python-list