← Back to team overview

dulwich-users team mailing list archive

Re: Test runners, nose and python 2.7

 

On Sun, Dec 26, 2010 at 04:23:54PM -0500, Augie Fackler wrote:
> >> We can codify that in setup.py and make
> >> it the One True Test System (and depending on unittest2 for old
> >> Pythons means that we can continue using the normal SkipTest
> >> approach *and* dispense with the madness in test/__init__ that tries
> >> to get the "right" SkipTest. I'm happy to take on this work if
> >> nobody objects.
> > I can live with unittest2 as default fallback test runner but
> > would like to keep the support for using testtools without the need to
> > install unittest2. What do you think about the attached patch?
> Should probably also list unittest2 in the test_requires stanza of the
> setup() call in setup.py if sys.version < (2,7).
That's a good point.

> Also: testtools can't handle normal unittest.TestCase subclasses? It feels
> like testtools should be adapting to unittest2 automatically, not users of
> testtools having to patch their code to deal with test skipping.
It can, but if we're using a non-standard TestSkip class it will need to know
about that - previously we could be using nose's SkipTest for example.

I'll file a bug in testtools about its test runner being able to recognize the
SkipTest exception from unittest2, that seems like a sensible thing to do.

We don't use much of the other functionality testtools offers.

> > Upstream Python appears to have gone with SkipTest as the name of the
> > exception while we use TestSkipped. I don't have any particular
> > preference for what we should use.
> I guess it'd be nice to use the conventional name, but whatever. Not worth the churn.
Same here. I'd be happy to push patches that fix this.

Cheers,

Jelmer



Follow ups

References