[Twisted-Python] Global reactor unit tests in the Twisted test suite

Tim Allen tim at commsecure.com.au
Tue Nov 1 22:20:17 EDT 2011

On Tue, Nov 01, 2011 at 02:48:02PM -0400, Glyph wrote:
> If you can think of a better solution that addresses all of these
> concerns simultaneously somehow, please share, I'd love to hear it
> :-).

I'm not sure if it addresses all your concerns, but
twisted.python.context will let you set a particular value for things
you call and all their descendants (unless one of them sets a new value
in the context). I can imagine interleaving code that passes a reactor
parameter explicitly and code that grabs a reactor from the current
context without much hassle.


More information about the Twisted-Python mailing list