[TIP] Testing asynchronous method

Jonathan Lange jml at mumak.net
Tue Oct 18 10:55:53 PDT 2011

On Tue, Oct 18, 2011 at 6:40 PM, Pere Martir <pere.martir4 at gmail.com> wrote:
> I want to test if a callback is called within a predefined time. I am
> surprised that I cannot find a simple solution on Internet.
> I don't want to use Twisted Trial or tornado.testing but only Python
> built-in unittest, is it possible ? I am developing  an asynchronous
> library by TDD, and I don't want to depend on Twisted or Tornado.

Yeah, it's possible, but you'll be re-implementing Twisted Trial for
whatever asynchronous system you are using.

I'm biased, but I'd strongly recommend using Twisted Trial or
something else that already exists.


More information about the testing-in-python mailing list