[TIP] Can I stop a pytest-xdist node after executing N tests?

Dan Wandschneider daniel.wandschneider at schrodinger.com
Mon Jun 6 03:45:41 PDT 2016


On Windows32, if I run all of our tests in one batch under py.test, I run
out of memory. Clearly, there are larger issues in test cleanup and our
customer facing code, but for now, I'd just like to unify test execution.

I was considering using py.test's xdist plugin, and generating a new test
node after running N tests (maybe 500 or 1000). To play with this idea,
I've created a subclass of xdist.dsession.LoadScheduling which sends at
most N tests, and emits node.shutdown() and node.gateway.exit() after N
tests have been run on the node.

I have 3 questions-

   - Is there some obviously better approach than restarting the xdist
   slave?
   - Is there a better way to trigger the node restart?
   - How can I make sure that the slave has exited cleanly?

Thanks-
Dan W.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20160606/cdca28c6/attachment.html>


More information about the testing-in-python mailing list