[Twisted-Python] Using twisted.trial with nose unittest system

Jonathan Lange jml at mumak.net
Tue Feb 6 19:38:26 EST 2007

On 2/7/07, Allen Bierbaum <abierbaum at gmail.com> wrote:
> On 2/6/07, Christopher Armstrong <radix at twistedmatrix.com> wrote:
> > On 2/6/07, Allen Bierbaum <abierbaum at gmail.com> wrote:
> > > someone
> > > has written a plugin for nose that allows it to test twisted code.  I
> > > don't think it looks as nice as trial, but it should work for the
> > > basics.    You can see it here:
> > > http://python-nose.googlecode.com/svn/trunk/nose/twistedtools.py
> >
> > UGH
> >
> > def threaded_reactor():
> Yep.  Not pretty by any means. :(
> I am sure that any suggestions you have to make it better would be
> well-recieved by the nose project and the plugin's author.   :)

I still need to spend some more time looking at nose, but in this
particular case I think the plugin is unnecessary.

If your tests subclass twisted.trial.unittest.TestCase, then they
should take care of the reactor themselves.[1]


[1] For the moment. There are plans to change this, but they are many,
many months away from implementation.

More information about the Twisted-Python mailing list