[TIP] [nose] handling other types of testsuite

Michael Foord michael at voidspace.org.uk
Fri Jan 20 08:40:03 PST 2012

On 20/01/2012 16:04, Chris Withers wrote:
> On 20/01/2012 15:54, jason pellerin wrote:
>>> ...so, I was wondering what your thoughts are in terms of dealing with
>>> TestSuite-ish objects that aren't generated by nose?
>> In a few places if you return a bare list of tests instead of a suite,
>> you'll automagically get a ContextSuite wrapper, but I'm not sure if
>> the place you're returning tests is one of those places. If not, try
>> to return a nose ContextSuite if you can. :( A lot of plugin methods
>> are triggered in the suite -- many things just won't work at all with
>> other kinds of test suites.
> Yeah, that's my figuring. I guess I need to work up a SweetWrapper 
> (hur hur) that mediates between what a ContextSuite provides and what 
> the wrapped TestSuite provides...
>> Or port your plugin to nose2, which doesn't have a custom test suite
>> and is happier for it. :)
> Is that usable yet? I thought that was dependent on unittest2's plugin 
> support, which hadn't been implemented or released yet as far as I 
> know...

nose2 took the work I did and reshaped it - so it doesn't depend on 
unittest2 plugin support. At the moment it's basically a fork with the 
plugin engine bundled.

All the best,


> Chris


May you do good and not evil
May you find forgiveness for yourself and forgive others
May you share freely, never taking more than you give.
-- the sqlite blessing http://www.sqlite.org/different.html

More information about the testing-in-python mailing list