On Fri, May 29, 2009 at 3:01 AM, David Ripton <drip...@ripton.net> wrote: > Another option is nose. Google for "nose.twistedtools"
I've used nose for twisted unittests - and it usually works fine for my purposes. Just to expand a bit on how *I've* used it: from nose.twistedtools import deferred from twisted.internet import defer @deferred() @defer.inlineCallbacks def test_something(): res = yield func_that_returns_deferred() assert res == 'something' etc. It's generally quite readable, and integrates nicely with non-twisted unittests - I like the way that you can just write 'asserts'. However, there are some caveats - namely that twisted is actually started in another thread. So, if you plan to run a server to test calls against (say in your setup_module) you need to make a wrapper around any connection maker to use reactor.callFromThread. Hope that's useful, Reza -- Reza Lotun +44 (0)7521 310 763 rlo...@gmail.com _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python