[TIP] Testing asynchronous method

Tom Davis tom at recursivedream.com
Tue Oct 18 12:35:35 PDT 2011

On Oct 18, 2011, at 1:55 PM, Jonathan Lange <jml at mumak.net> wrote:

> 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.

Unless you have a technical reason for not being able to depend on Trial (e.g. you literally cannot deploy Twisted), I concur. Trial is great and widely used.

> jml
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python

More information about the testing-in-python mailing list