<br><br><div class="gmail_quote">On Fri, Nov 11, 2011 at 10:54 AM, Mark Sienkiewicz <span dir="ltr">&lt;<a href="mailto:sienkiew@stsci.edu">sienkiew@stsci.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im">On 11/11/11 10:06, Michael Foord wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
On 11 Nov 2011, at 01:54, Gary Bernhardt wrote:<br>
<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I can&#39;t resist...<br>
<br>
os.system(&quot;(sleep 30&amp;&amp;  kill %s)&amp;&quot; % os.getpid())<br>
</blockquote><div class="im">
<br>
That would require running each test in a separate process (or providing a test *run* timeout rather than a test timeout) - which faulthandler doesn&#39;t. :-p<br>
<br>
</div></blockquote>
<br>
<br>
It&#39;s a bit weak in the reporting area too. :)<br>
<br>
Seriously, though, I AM going to implement something similar.  In my system a &quot;test run&quot; involves hundreds of processes running tests with many different test runners.  If a particular instance of a test runner does not implement time limits, the control system can kill it eventually.  So, first level is that faulthandler can interrupt a particular test and report what test ran over, second level is a test runner can get killed and report what file ran over, and third level is that the CI system can decide that the set of all tests is taking too long.<br>


<br>
Now, all I have to do now is implement all that...</blockquote><div><br></div><div>There is some features in the workings for py.test that would allow reporting execution times for tests, given a nice API for this adding some functionality</div>

<div>that plugs into it would be trivial.</div><div><br></div><div>Nothing that would help you *right now* though :( </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="HOEnZb"><div class="h5"><br>
<br>
Mark S.<br>
<br>
<br>
______________________________<u></u>_________________<br>
testing-in-python mailing list<br>
<a href="mailto:testing-in-python@lists.idyll.org" target="_blank">testing-in-python@lists.idyll.<u></u>org</a><br>
<a href="http://lists.idyll.org/listinfo/testing-in-python" target="_blank">http://lists.idyll.org/<u></u>listinfo/testing-in-python</a><br>
</div></div></blockquote></div><br>