unit testing
Tim Chase
python.list at tim.thechases.com
Thu Oct 4 16:28:47 EDT 2007
>>> Does anyone else feel that unittesting is too much work? Not in general,
>>> just the official unittest module for small to medium sized projects?
> [snip]
>> I actually do a lot of unit testing. I find it both annoying and
>> highly necessary and useful.
>
> +1 QOTW.
>
> I feel exactly the same way. Writing tests (whether you use unittest,
> doctest, py.test or whatever) is always a pain and a time sink. But
> writing those tests catches so many bugs that it's worth it for any code
> you expect to use more than twice. =)
If test-driven development doesn't appeal, you might prefer Titus
Brown's methodology from PyCon '07:
"""
I don't do test-driven development; I do stupidity-driven
testing. When I do something stupid, I write a test to make sure
I don't do it again.
"""
http://ivory.idyll.org/blog/feb-07/stupidity-driven-testing
-tkc
More information about the Python-list
mailing list