[TIP] unittest issues and development

Fernando Perez fperez.net at gmail.com
Tue Feb 9 14:59:17 PST 2010


Hi Michael,

On Tue, Feb 9, 2010 at 2:17 PM, Michael Foord <fuzzyman at voidspace.org.uk> wrote:
> For those of you interested in the development of unittest, I've just sent a
> couple of emails about future development. The first lists a bunch of small
> issues that need dealing with and the second about setUp / tearDown of class
> and module (a subject I know several of you feel strongly about and there is
> no *particular* need to revisit that debate...).

I'm sorry I never filed this on the tracker, but when I tried I had
all kinds of problems retrieving my password (emails never arriving,
etc) and I must admit I just lost patience and gave up.  But in case
you are interested, you're welcome to use the code we put into ipython
for clean, unittest-based parametric testing (something nose has but
which produces effectively undebuggable tests, while this approach
gives perfectly debuggable ones).  The code lives here for 2.x and
3.x:

http://bazaar.launchpad.net/~ipython-dev/ipython/trunk/annotate/head%3A/IPython/testing/_paramtestpy2.py

http://bazaar.launchpad.net/~ipython-dev/ipython/trunk/annotate/head%3A/IPython/testing/_paramtestpy3.py

we import them into our public decorators module for actual use:

http://bazaar.launchpad.net/~ipython-dev/ipython/trunk/annotate/head%3A/IPython/testing/decorators.py

Simple tests showing them in action are here:

http://bazaar.launchpad.net/%7Eipython-dev/ipython/trunk/annotate/head%3A/IPython/testing/tests/test_decorators.py#L45

The code is all BSD and we'd be more than happy to see it used
upstream; the less we have to carry the better :)

Cheers,

f



More information about the testing-in-python mailing list