[TIP] aborting tests that take too long

Mark Sienkiewicz sienkiew at stsci.edu
Fri Nov 11 07:15:38 PST 2011


On 11/11/11 09:49, Michael Foord wrote:
> RIght, after a bit of investigation, the new timeout feature of regrtest uses the faulthandler module and kills the test (dumping the traceback) after a specified time:
>
> 	http://hg.python.org/cpython/file/bd5c4dda6ad0/Lib/test/regrtest.py#l852
>
> 	timeout -- dump the traceback and exit if a test takes more than timeout seconds
>
> 	http://pypi.python.org/pypi/faulthandler/
>
> faulthandler should be usable from any test framework.


Thanks!  I'll check it out.  It looks like exactly what I need.  I just need to write a decorator or a plugin for it.


Mark S.




More information about the testing-in-python mailing list