This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author barry
Recipients barry, njs
Date 2017-05-09.00:44:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <20170508204443.203cfe7d@presto>
In-reply-to <1494284788.34.0.135054216894.issue30300@psf.upfronthosting.co.za>
Content
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.
History
Date User Action Args
2017-05-09 00:44:57barrysetrecipients: + barry, njs
2017-05-09 00:44:57barrylinkissue30300 messages
2017-05-09 00:44:56barrycreate