[TIP] What to do when a test is stuck
doug at sadahome.ca
Mon Sep 7 08:44:14 PDT 2009
On Mon, Sep 7, 2009 at 6:28 AM, yoav glazner<yoavglazner at gmail.com> wrote:
> I'm using Nose with Pymock.
> I have some tests that could result in an endless loop.
> how can termenate it after some time if no result was given?
> i wonder if there is a decorator for these things, something like:
> @time_limit(5) # now this test should fail.
> def testMylooping(self):
> assert 1+1 == 2 ,'python told me that 1+1 != 2!!!'
More information about the testing-in-python