Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration with pytest-timeout plugin #21

Open
jhagege opened this issue Jul 16, 2019 · 1 comment
Open

Integration with pytest-timeout plugin #21

jhagege opened this issue Jul 16, 2019 · 1 comment

Comments

@jhagege
Copy link

jhagege commented Jul 16, 2019

Hi, when trying to add pytest-timeout to troubleshoot a hanging test, I get the following output:

Traceback (most recent call last):
  File "/opt/conda/lib/python3.6/site-packages/_pytest/main.py", line 203, in wrap_session
    session.exitstatus = doit(config, session) or 0
  File "/opt/conda/lib/python3.6/site-packages/_pytest/main.py", line 243, in _main
    config.hook.pytest_runtestloop(session=session)
  File "/opt/conda/lib/python3.6/site-packages/pluggy/hooks.py", line 289, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/opt/conda/lib/python3.6/site-packages/pluggy/manager.py", line 87, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/opt/conda/lib/python3.6/site-packages/pluggy/manager.py", line 81, in <lambda>
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
  File "/opt/conda/lib/python3.6/site-packages/pluggy/callers.py", line 203, in _multicall
    gen.send(outcome)
  File "/opt/conda/lib/python3.6/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/opt/conda/lib/python3.6/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/opt/conda/lib/python3.6/site-packages/_pytest/main.py", line 264, in pytest_runtestloop
    item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
  File "/opt/conda/lib/python3.6/site-packages/pluggy/hooks.py", line 289, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/opt/conda/lib/python3.6/site-packages/pluggy/manager.py", line 87, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/opt/conda/lib/python3.6/site-packages/pluggy/manager.py", line 81, in <lambda>
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
  File "/opt/conda/lib/python3.6/site-packages/pluggy/callers.py", line 208, in _multicall
    return outcome.get_result()
  File "/opt/conda/lib/python3.6/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/opt/conda/lib/python3.6/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/opt/conda/lib/python3.6/site-packages/pytest_forked/__init__.py", line 35, in pytest_runtest_protocol
    reports = forked_run_report(item)
  File "/opt/conda/lib/python3.6/site-packages/pytest_forked/__init__.py", line 56, in forked_run_report
    result = ff.waitfinish()
  File "/opt/conda/lib/python3.6/site-packages/py/_process/forkedfunc.py", line 82, in waitfinish
    pid, systemstatus = waiter(self.pid, 0)
  File "/opt/conda/lib/python3.6/site-packages/pytest_timeout.py", line 140, in handler
    timeout_sigalrm(item, params.timeout)
  File "/opt/conda/lib/python3.6/site-packages/pytest_timeout.py", line 313, in timeout_sigalrm
    pytest.fail('Timeout >%ss' % timeout)
  File "/opt/conda/lib/python3.6/site-packages/_pytest/outcomes.py", line 113, in fail
    raise Failed(msg=msg, pytrace=pytrace)
Failed: Timeout >120.0s

Seems that the traceback includes only pytest-forked information.
Do you know if it's at all possible to get some traceback info from the wrapped test?
Thanks.

@RonnyPfannschmidt
Copy link
Member

its not possible at the moment and i have no plans on implementing or investigating it personally as im no longer working on pytest-forked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants