[TIP] What to do when a test is stuck

yoav glazner yoavglazner at gmail.com
Mon Sep 7 06:28:27 PDT 2009


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!!!'

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.idyll.org/pipermail/testing-in-python/attachments/20090907/9d658b53/attachment.html 

More information about the testing-in-python mailing list