Hi Floris,

first of all thanks for this plugin as this is something my team will be more 
than happy to leverage.

I gave it a shot yesterday (just kicking the tires) and while the plugin was 
installed (see below) and registered it didn't 
work for me (ubuntu/python 2.6.6)

This is py.test version 2.2.3, imported from 
/home/lpbrac/.buildout/eggs/pytest-2.2.3-py2.6.egg/pytest.pyc
setuptools registered plugins:
  pytest-xdist-1.8 at 
/home/lpbrac/.buildout/eggs/pytest_xdist-1.8-py2.6.egg/xdist/plugin.pyc
  pytest-cov-1.5 at 
/home/lpbrac/.buildout/eggs/pytest_cov-1.5-py2.6.egg/pytest_cov.pyc
  pytest-testlink-0.0.6 at 
/home/lpbrac/repos/p4_qa/qa/infrastructure/taf/pytest_plugins/pytest_testlink/src/pytest_testlink/tl_plugin.py
  pytest-session-cfg-0.0.2 at 
/home/lpbrac/.buildout/eggs/pytest_session_cfg-0.0.2-py2.6.egg/pytest_session_cfg.py
  pytest-timeout-0.1 at 
/home/lpbrac/.buildout/eggs/pytest_timeout-0.1-py2.6.egg/pytest_timeout.pyc

Just wrote an infinite loop which never got preempted. I didn't have time to 
dig any deeper. Does the test need to be executed in a separate process via 
xdist? 

Also, currently the time out applies to all tests (and defaults to 5 minutes). 
I think it would be useful to be able to override the timeout 
at the test level using markers. If something goes wrong and we have thousands 
of tests (we use pytest to test embedded systems), this is an awful lot of time 
to realize that things are DOA. 

Best Regards and thanks again for starting this. 

/Laurent

-----Original Message-----
From: py-dev-boun...@codespeak.net on behalf of Floris Bruynooghe
Sent: Sun 2/26/2012 3:19 PM
To: py-dev@codespeak.net
Subject: [py-dev] New plugin: pytest-timeout
 
Hi all,

This is to announce the first release of pytest-timeout, a plugin
which will interrupt long running (i.e. blocking) tests.  This is
particularly useful when running the tests on a CI host. When a test
is interrupted the stacks of all threads are dumped to stderr, which
helps you to locate the reason for the blocking.  If the system
supports SIGALRM then the test itself is interrupted using
pytest.fail() and other tests continue to run, otherwise the stack(s)
are dumped to stderr and the process exists immediately.

The plugin is available from the cheeseshop:
http://pypi.python.org/pypi/pytest-timeout and the code lives at
bitbucket: https://bitbucket.org/flub/pytest-timeout/.  Feel free to
provide any feedback or report issues.

Regards,
Floris

-- 
Debian GNU/Linux -- The Power of Freedom
www.debian.org | www.gnu.org | www.kernel.org
_______________________________________________
py-dev mailing list
py-dev@codespeak.net
http://codespeak.net/mailman/listinfo/py-dev

_______________________________________________
py-dev mailing list
py-dev@codespeak.net
http://codespeak.net/mailman/listinfo/py-dev

Reply via email to