Err, are there any docs with an example of what prepareTestCase should return?<div><br></div><div>Thanks,</div><div>Alex<br><br><div class="gmail_quote">On Wed, Jul 20, 2011 at 9:16 PM, Alex Gaynor <span dir="ltr"><<a href="mailto:alex.gaynor@gmail.com">alex.gaynor@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Synchronous, normal style is totally fine, so it looks like prepareTestCase is the right call. Thanks.<div><br></div>
<div><font color="#888888">Alex</font><div><div></div><div class="h5"><br><br><div class="gmail_quote">On Wed, Jul 20, 2011 at 6:32 PM, jason pellerin <span dir="ltr"><<a href="mailto:jpellerin@gmail.com" target="_blank">jpellerin@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">That's a fun one. Do you want to wait for cpython to execute each<br>
test, or send a bunch of tests over to process/process pool and<br>
collect the results later?<br>
<br>
The wait case is not so hard -- you can write a plugin that implements<br>
prepareTestCase* to wrap the test in the cpythonizing machinery, run<br>
it, and report the result.<br>
<br>
The queue and collect case is sort of a special case of<br>
multiprocessing which requires writing a new test runner and is<br>
harder. But basically you write whatever test runner you want and use<br>
the prepareTestRunner** plugin hook to inject it.<br>
<br>
Also we really need to add pypy to our tox config, Kumar. ;)<br>
<br>
JP<br>
<br>
* <a href="http://packages.python.org/nose/plugins/interface.html#nose.plugins.base.IPluginInterface.prepareTestCase" target="_blank">http://packages.python.org/nose/plugins/interface.html#nose.plugins.base.IPluginInterface.prepareTestCase</a><br>
<br>
**<br>
<a href="http://packages.python.org/nose/plugins/interface.html#nose.plugins.base.IPluginInterface.prepareTestRunner" target="_blank">http://packages.python.org/nose/plugins/interface.html#nose.plugins.base.IPluginInterface.prepareTestRunner</a><br>
<div><div></div><div><br>
On Wed, Jul 20, 2011 at 9:15 PM, Alex Gaynor <<a href="mailto:alex.gaynor@gmail.com" target="_blank">alex.gaynor@gmail.com</a>> wrote:<br>
> Hi all,<br>
> I've got a fair insane question about nose. I'd like to be able to control<br>
> how my nose tests are executed, specifically I'm running my suite under<br>
> PyPy, but I'd like certain tests (in their entirety, setup, test, teardown)<br>
> to be executed on CPython. I have the machinery to send some code over to<br>
> CPython to execute it, but what I'm missing is the ability to do that over<br>
> the entirety of a test run. In py.test I believe this could be accomplished<br>
> with a custom test collector.<br>
> Thanks,<br>
> Alex<br>
><br>
> --<br>
> "I disapprove of what you say, but I will defend to the death your right to<br>
> say it." -- Evelyn Beatrice Hall (summarizing Voltaire)<br>
> "The people's good is the highest law." -- Cicero<br>
><br>
><br>
</div></div>> _______________________________________________<br>
> testing-in-python mailing list<br>
> <a href="mailto:testing-in-python@lists.idyll.org" target="_blank">testing-in-python@lists.idyll.org</a><br>
> <a href="http://lists.idyll.org/listinfo/testing-in-python" target="_blank">http://lists.idyll.org/listinfo/testing-in-python</a><br>
><br>
><br>
</blockquote></div><br><br clear="all"><br></div></div>-- <br><div class="im">"I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire)<br>
"The people's good is the highest law." -- Cicero<br>
<br>
</div></div>
</blockquote></div><br><br clear="all"><br>-- <br>"I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire)<br>"The people's good is the highest law." -- Cicero<br>
<br>
</div>