[Tutor] writing effective unittests

Tino Dai oberoc at gmail.com
Thu Jan 3 21:31:07 CET 2013


I think what I need is a conceptual shift: how do python programmers use
> unittests?
>
>
Here at the Library, we use unit test to test the cases that have many
known inputs. For example, some of the data could come in "foo bar baz",
and some others could come in as "foo, bar, baz", and others could come in
"foo; bar; baz". As we code for each one of these cases, we write tests to
make sure that changes that we make don't break any of our former code. I
think that TDD is a good thing to strive for, but in most cases is an ideal
that can't be reached in most cases.

Hope that helps,
Tino
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130103/22548f36/attachment.html>


More information about the Tutor mailing list