<div dir="ltr"><div>Hi,</div>
<div> </div>
<div>I&#39;m using Nose with Pymock.</div>
<div>I have some tests that could result in an endless loop.</div>
<div>how can termenate it after some time if no result was given?</div>
<div> </div>
<div>i wonder if there is  a decorator for these things, something like:</div>
<div> </div>
<div>@time_limit(5) # now this test should fail.</div>
<div>def testMylooping(self):</div>
<div>  while(True):</div>
<div>    assert 1+1 == 2 ,&#39;python told me that 1+1 != 2!!!&#39;</div>
<div> </div>
<div> </div>
<div>Thanks,</div>
<div>Yoav.</div></div>