[py-dev] pytest-timeout 0.2

Floris Bruynooghe flub at devork.be
Mon Mar 19 23:20:56 CET 2012

On 19 March 2012 16:38, Brack, Laurent P. <lpbrac at dolby.com> wrote:
> It would also be nice to have a consistent behavior between sigalarm on/off. For instance, on Windows, pytest exits on first hang as opposed to *nix where the test is pre-empted and pytest moves on to the next one.

I was writing up a response saying I didn't know how to do so, but
while doing so I thought it might be possible to emulate sigalrm with
a timer thread which fires an other signal.  I might investigate the
feasibility of such an approach.  I do worry about gratuitously using
signals however, the simple timer thread with os._exit() may always
have to stay as the fail-safe option.

If anyone has any other ideas about this please let me know.


Debian GNU/Linux -- The Power of Freedom
www.debian.org | www.gnu.org | www.kernel.org

More information about the Pytest-dev mailing list