[TIP] aborting tests that take too long
Gary Bernhardt
gary.bernhardt at gmail.com
Thu Nov 10 17:54:48 PST 2011
I can't resist...
os.system("(sleep 30 && kill %s)&" % os.getpid())
--
Gary
http://destroyallsoftware.com
On Thu, Nov 10, 2011 at 5:46 PM, Michael Foord
<fuzzyman at voidspace.org.uk> wrote:
> regrtest (from the Python test suite) on Python head has some interesting (and newish) code for aborting tests that take too long. May be worth taking a look at.
>
> Michael
>
>
> On 10 Nov 2011, at 15:28, Mark Sienkiewicz wrote:
>
>> I have a general problem with tests that deadlock, go into an infinite loop, or otherwise just run for way too long. I need to do something about this because it is starting to become a problem in my CI system.
>>
>> When a test takes too long, I don't just want the test to fail if it takes too long -- I want it to be forced to stop running. Is there some way to do this in py.test or nose?
>>
>> Mark S.
>>
>>
>> _______________________________________________
>> testing-in-python mailing list
>> testing-in-python at lists.idyll.org
>> http://lists.idyll.org/listinfo/testing-in-python
>>
>
>
> --
> http://www.voidspace.org.uk/
>
>
> May you do good and not evil
> May you find forgiveness for yourself and forgive others
> May you share freely, never taking more than you give.
> -- the sqlite blessing
> http://www.sqlite.org/different.html
>
>
>
>
>
>
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python
>
More information about the testing-in-python
mailing list