Message293264
On May 08, 2017, at 11:06 PM, Nathaniel Smith wrote:
>Looks interesting! What's the advantage over running the server and the test
>in the same loop? The ability to use blocking operations in the tests, and to
>re-use an expensive-to-start server over multiple tests?
So, the ability to re-use expensive-to-start servers is definitely one of the
advantages. I use nose2's layers, but test fixtures would fall into the same
category.
As for running the server and tests in the same loop; I haven't tried that,
but it seems like it would be more complicated to set up (maybe that's
dependent on the code under test). More important is that I want to block the
tests until the server starts up. I'm not sure (haven't tried) whether that's
possible when running them all in the same loop.
One other use case I have is for the LMTP server in Mailman 3. The controller
turns out to be useful based on the start/stop framework for MM3 "runners".
That's probably strictly doable without the controller, but it's convenient,
readable, and a nice reuse. |
|
Date |
User |
Action |
Args |
2017-05-09 00:44:57 | barry | set | recipients:
+ barry, njs |
2017-05-09 00:44:57 | barry | link | issue30300 messages |
2017-05-09 00:44:56 | barry | create | |
|