Closed pytest-timeout-bot closed 4 years ago
Original comment by Floris Bruynooghe (Bitbucket: flub, GitHub: flub).
pytest-timeout already implements the pytest_exception_interact and the pytest_enter_pdb hooks which solved most people’s problems around debugging, e.g. it will work nicely with pytest --pdb
. What else do you need provided? If you’re just after an option on the command line you could just use --timeout=999999
and probably be fine.
this could probably be fixed py patching sys.breakpointhook
And asking users to use @asottile's breakpoint backport
@graingert Could you point out where to find that patch?
This could probably be fixed py patching sys.breakpointhook
Are there any plans to add this functionality? One could also use this answer on SO, although it requires the user to have a breakpoint set at the very beginning of the session.
It looks like pytest actual attempts this with, but it's obviously not enough:
@pytest.hookimpl
def pytest_enter_pdb():
# Since pdb.set_trace happens outside of any pytest control, we don't have
# any pytest ``item`` here, so we cannot use timeout_teardown. Thus, we
# need another way to signify that the timeout should not be performed.
global SUPPRESS_TIMEOUT
SUPPRESS_TIMEOUT = True
Original report by Anonymous.
Hi,
I am looking for an option to disable pytest-timeout when executing in debug mode, even tests under
@pytest.mark.timeout(...)
. Any option I could pass?Thanks for help in advance.