[TIP] Testing asynchronous method

Natalia Bidart nataliabidart at gmail.com
Thu Oct 20 06:13:01 PDT 2011


Hey Peter,

On Wed, Oct 19, 2011 at 2:30 PM, Pere Martir <pere.martir4 at gmail.com> wrote:
> I've just tried to implement my test with tornado.testing and Twisted
> Trial but I had no luck.
>
> It seems to me that these frameworks cannot be used in the "general
> context". They are only designed to test the applications built with
> _that_ framework.

In my experience, this is certainly _not_ the case. Currently, I'm
working on at least 2 projects where we use trial for running the test
suite, but the production code depends on nothing from twisted itself
except from deferreds, and those can be easily replaced by the
deferreds provided in the python-deferred library.

So, if you wanna take a look, the projects are:

http://launchpad.net/ubuntu-sso-client

http://launchpad.net/ubuntuone-control-panel/

(in the latter, there are 2 "web client" implementations, one uses the
web client from twisted, and the other uses libsoup. So, when running
the project on linux, you get an app that uses no twisted at all and
yet all the test suite is built on top of trial).

I'll be happy to give you more details, let me know!
Cheers, Natalia.



More information about the testing-in-python mailing list