[Twisted-Python] Re: Hanging test cases (Was: Evangelism notes...)

David Bolen db3l at fitlinxx.com
Fri May 6 17:11:12 EDT 2005


Jp Calderone <exarkun at divmod.com> writes:

>   So as to be entirely clear, I'm going to limit this response to
>   just one idea.  If more details are desired, I can post a followup
>   later (as long as someone asks for one).  Anyway, for now, here's
>   the meat of this post:
> 
> 
>       Do
> 
>       _____not_____
> 
>       use
> 
>       deferredResult
> 
>       (or deferredError or wait)
> 
>   As someone who pushed for their existence, I apologize.

Just to be clear, IMHO, I'd qualify this by saying something like in
final production code or non-test code or something.  We make heavy
use of these functions in our unit tests and they are invaluable ways
to simplify the structure of such tests when each test is the only
thing going on and there's no problem iterating the reactor beneath a
blocking call.  We've also cheated and used them for pure startup code
in GUI apps that are quick 'n dirty example interfaces into our main
Twisted system, and again they can simplify such efforts.

But I do agree they really have no place in final production code.

-- David





More information about the Twisted-Python mailing list