[TIP] Python 2.2 - Testing Framework?

Kumar McMillan kumar.mcmillan at gmail.com
Sun Apr 13 11:25:03 PDT 2008


On Sun, Apr 13, 2008 at 12:29 PM, Carl Trachte <ctrachte at gmail.com> wrote:
>  Is there a framework or testing methodology for Python 2.2?  Our mine
>  planning software vendor uses Python 2.2 as their API.  I would like
>  to start writing tests for the code I'm writing against it.
>
>  Do you recommend that I roll my own, or has someone already done this work?

there is a module in Python 2.2's standard library called unittest and
its interface will look very familiar if you are used to xUnit (NUnit,
JUnit, etc).  Just "import unittest"

http://docs.python.org/lib/module-unittest.html

If you wanted some more help in dealing with a large suite of tests,
you could use the nose module,
http://somethingaboutorange.com/mrl/projects/nose/ .  Although that
requires at least Python 2.3 .



More information about the testing-in-python mailing list