<div dir="ltr"><div>Nope, this waits untill the test is done and then makes it fail if the time_taken > limit</div>
<div>my test might get stuck... (i'm using COM so i can never know...).<br><br></div>
<div class="gmail_quote">On Mon, Sep 7, 2009 at 6:44 PM, Doug Latornell <span dir="ltr"><<a href="mailto:doug@sadahome.ca">doug@sadahome.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">See nose.tools.timed<br><a href="http://somethingaboutorange.com/mrl/projects/nose/0.11.1/testing_tools.html#module-nose.tools" target="_blank">http://somethingaboutorange.com/mrl/projects/nose/0.11.1/testing_tools.html#module-nose.tools</a><br>
<font color="#888888"><br>Doug<br></font>
<div>
<div></div>
<div class="h5"><br>On Mon, Sep 7, 2009 at 6:28 AM, yoav glazner<<a href="mailto:yoavglazner@gmail.com">yoavglazner@gmail.com</a>> wrote:<br>> Hi,<br>><br>> I'm using Nose with Pymock.<br>> I have some tests that could result in an endless loop.<br>
> how can termenate it after some time if no result was given?<br>><br>> i wonder if there is a decorator for these things, something like:<br>><br>> @time_limit(5) # now this test should fail.<br>> def testMylooping(self):<br>
> while(True):<br>> assert 1+1 == 2 ,'python told me that 1+1 != 2!!!'<br>><br>><br>> Thanks,<br>> Yoav.<br></div></div></blockquote></div><br></div>