<div dir="ltr">Hi Wouter,<br><br><div class="gmail_quote"><div dir="ltr">On Mon, Jan 29, 2018 at 10:58 AM Wouter Overmeire &lt;<a href="mailto:lodagro@gmail.com">lodagro@gmail.com</a>&gt; wrote:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I have something basic running now. Save nodeids of all test tests to be run (pytest_collection_modifyitems) and test by test store the nodeids (pytest_runtest_makereport) of the completed tests. When restarting pytest using plugin specific flag the already completed tests will be marked <i>pytest.mark.skip</i>.</div></div></blockquote><div><br></div><div>Another way of implementing this is to remove the tests which passed in the previous pytest run during `pytest_collection_modifyitems`; that&#39;s how the -m, -k, --lf and --ff command-line options work.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Two questions:</div><div>- What is <i>pytest</i>-way of stopping a run from within a plugin and informing the user why? I now raise an exception, which is show as an INTERNALERROR.</div></div></blockquote><div><br></div><div>You can use `pytest.exit(msg)` for that.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>- How to handle reporting? Is there a way to save report per test, so while running and not postpone report generation up to the end?</div></div></blockquote><div><br></div><div>Saving the report object is a little tricky (for example pytest-xdist does it manually[1]). Why do you want to do this? </div><div><br></div><div>Cheers,</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div class="gmail_extra"><i></i><i></i><br><div class="gmail_quote">2018-01-24 15:37 GMT+01:00 Bruno Oliveira <span dir="ltr">&lt;<a href="mailto:nicoddemus@gmail.com" target="_blank">nicoddemus@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Wouter,<div><br></div><div>Currently there&#39;s no support for that, but I imagine to implement a plugin to do that should be relatively easy if you are inclined to. :)</div><div><br></div><div>If you go with the route of implementing a plugin, feel free to ask for advice on IRC[1] or creating an issue with your questions in the pytest bug tracker [2].</div><div><br></div><div>Cheers,</div><div>Bruno</div><div><br></div><div>[1] <a href="https://docs.pytest.org/en/latest/contact.html" target="_blank">https://docs.pytest.org/en/latest/contact.html</a></div><div>[2] <a href="https://github.com/pytest-dev/pytest/issues" target="_blank">https://github.com/pytest-dev/pytest/issues</a></div></div><br><div class="gmail_quote"><div><div class="m_7600729677495349703h5"><div dir="ltr">On Wed, Jan 24, 2018 at 12:10 PM Wouter Overmeire &lt;<a href="mailto:lodagro@gmail.com" target="_blank">lodagro@gmail.com</a>&gt; wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_7600729677495349703h5"><div dir="ltr"><div>Hi,</div><div><br></div><div>How can I resume an interrupted pytest test run?</div><div><br></div><div>Suppose using command line arguments I select a number of tests to be run by pytest. The tests take a while and in the middle of the run there is an issue (for example a power outage) and pytest was stopped. Is it possible to resume an interrupted run?</div><div><br></div><div>The idea is not to rerun the failed tests, but to run only those tests that did not run in the first run.</div><div><br></div><div>Wouter</div></div></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" rel="noreferrer" target="_blank">http://lists.idyll.org/listinfo/testing-in-python</a><br>
</blockquote></div>
</blockquote></div><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" rel="noreferrer" target="_blank">http://lists.idyll.org/listinfo/testing-in-python</a><br>
</blockquote></div></div>