doctest, unittest, or if __name__='__main__'

john_sips_tea at yahoo.com john_sips_tea at yahoo.com
Tue Mar 21 16:30:16 EST 2006


> because it's a vastly superior way to write tests ?

Well, since this is a mailing list where this sort of thing is
discussed, and since I was was asking about which way
is preferred, could you tell us why you (presumably) think
doctest is vastly superior to unittest?

> why is it that comp.lang.python is suddenly full of folks who
> want to deprecate anything they don't understand ?

I didn't say I wanted to deprecate it. I wrote that I noticed
there was no mention in PEP 3k about deprecating it.

> don't you have better things to do with your time ?

That wasn't very friendly.

Anyhow, I'm not attacking doctest, but rather, just trying
to understand why there seems to be two very similar ways
of testing your code built into the system (considering that
one motto around here is "There should be one -- and
preferably only one -- obvious way to do it.").




More information about the Python-list mailing list