[Tutor] More on unit testing - tests for external data...

Kent Johnson kent37 at tds.net
Fri Dec 11 15:09:48 CET 2009


On Thu, Dec 10, 2009 at 11:19 PM, Modulok <modulok at gmail.com> wrote:

> It seems like there are a lot of people on this list interested in
> getting more familiar with unit testing, but not a whole lot of
> non-trivial, python-specific examples being passed around.

> Case studies/tutorials anyone?

Unit testing has become common, accepted practice in open source
projects so real-world examples abound.

Python itself has extensive unit tests. To a large extent they
actually define the language and the libraries - Jython and IronPython
use the CPython test suite to validate their implementations. Download
the Python source to get a copy of the tests.

The Python unit tests largely predate the unittest module so they are
not necessarily good examples of unittest.

I suggest you pick an open source Python project that you use or like
and look at its test suite.

Kent


More information about the Tutor mailing list