[TIP] unittest q: keeping track of the *right* number of tests

Sylvain Thénault sylvain.thenault at logilab.fr
Mon Mar 23 01:54:02 PDT 2009

Le Monday 23 March 2009 00:15:22 C. Titus Brown, vous avez écrit :
> If Michael Foord and others don't know of a standard unittest extension
> to do this, then it probably doesn't exist!  I guess we'll just have to
> hack something together...  I abandoned unittest a while ago, but we're
> still using it in pygr so I will have to deal ;)

notice that in logilab-common_, you can find a testlib module which extends 
the  standard unittest module. You simply have to use its TestCase class and 
unittest_main function, and then you have some unittest + setup/teardown 
module, skip test support, more test primitives (assertIsInstance, 
assertTextEquals...), etc... As a bonus you have the pytest utilitiy for fine 
control of test executions.

logilab-common: http://www.logilab.org/project/logilab-common

Sylvain Thénault                               LOGILAB, Paris (France)
Formations Python, Zope, Plone, Debian:  http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
Python et calcul scientifique:           http://www.logilab.fr/science

More information about the testing-in-python mailing list