[Twisted-Python] Global reactor unit tests in the Twisted test suite
p.mayers at imperial.ac.uk
Wed Nov 2 03:55:32 EDT 2011
On 11/01/2011 11:49 PM, Glyph wrote:
> of "real" reactors. New contributors sometimes say that they don't feel
> like the code is "really" being tested unless they're testing against
> the real implementation of something, and it may not be immediately
> obvious that testing against a not-real implementation is desirable in
> many cases. Much of it can just be copy/pasted from this thread :).
Without commenting on everything else in the thread - this realisation
was something I came to late, and I feel it would have helped enormously
if it had come earlier. So, +1 on convincing people to go for in-memory
/ simulated transport/clock/etc.
But I'll note that most people I've seen crib from existing test code
during the early phases of TDD, tutorials or not - and if most test code
in Twisted uses the real reactor...
More information about the Twisted-Python