<div dir="ltr">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&#39;d just like to unify test execution.<div><br></div><div>I was considering using py.test&#39;s xdist plugin, and generating a new test node after running N tests (maybe 500 or 1000). To play with this idea, I&#39;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.</div><div><br></div><div>I have 3 questions-</div><div><ul><li>Is there some obviously better approach than restarting the xdist slave?</li><li>Is there a better way to trigger the node restart?</li><li>How can I make sure that the slave has exited cleanly?</li></ul><div>Thanks-</div></div><div>Dan W.</div></div>