separate trial release (was Re: [Twisted-Python] Twisted Jabber

glyph at glyph at
Thu Oct 27 02:08:34 EDT 2005

On Thu, 27 Oct 2005 12:52:37 +1100, Jonathan Lange <jml at> wrote:
>On 27/10/05, Glyph Lefkowitz <glyph at> wrote:

> (...) the reactor stuff is going in TestCase.

I believe I've lodged a disagreement with you before about this.  If you really think it's best I'll trust your judgement more than mine, since you're certainly doing a bang-up job getting trial into useful shape, but I'll still try to convince you :).

The reactor should be started by the command-line tool and stopped after all tests are done.  Several reasons why:

 - Tests should be runnable by "live" processes.  *twisted* context should need to be around, not unittest context, for the tests to run properly.  This would help a lot in situations where something seems to work for the test framework but doesn't on a live server.

 - We try, but some event loops really *can't* be stopped and restarted safely or reliably multiple times within the same process.  Previous discussions on this list I believe called out cfreactor as an example.  I believe there are others.

 - Normal execution of Twisted programs has the Reactor start up once, lots of stuff run in it, and then it shuts down.  I don't mind exercising the edge cases, but this _only_ excercises the edge cases; the reactor starts up and shuts down every time something new happens.

>The advantages definitely include reduced duplication and less code to
>maintain.  But another big advantage is that (when we're ready) Trial
>can use third-party extensions of unittest straight out of the box.

Are there any such third-party extensions which have value?

More information about the Twisted-Python mailing list