[Twisted-Python] Blocking on deferreds during unit tests (e.g. deferredResult)

Eric Mangold teratorn at twistedmatrix.com
Fri May 6 03:59:57 EDT 2005


I'm starting a new thread on this because It's very important to me, and  
we need to have some kind of resolution on this issue.

On Fri, 06 May 2005 16:00:50 +1000, Jp Calderone <exarkun at divmod.com>  
wrote:
[...]
>       Do
>
>       _____not_____
>
>       use
>
>       deferredResult
>
>       (or deferredError or wait)
>
>   As someone who pushed for their existence, I apologize.
>
>   Jp

I would like to have more details on this considering that I use  
deferredResult and deferredError quite extensively, and very much  
appreciate their existence. If methods suck this bad we need to deprecate  
them and provide something better.

Is there a better way to synchronously spin the reactor until a deferred  
fires? There any many cases in which I prefer to do that instead of  
returning a deferred from the test case method.

-Eric




More information about the Twisted-Python mailing list