[TIP] Testing asynchronous method

Chris Withers chris at simplistix.co.uk
Fri Oct 21 10:30:41 PDT 2011


On 18/10/2011 18:55, Jonathan Lange 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.

I thought all the clever was embedded in twisted's TestCase class?

Chris

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
             - http://www.simplistix.co.uk



More information about the testing-in-python mailing list