<div dir="ltr">Hi,<div><br></div><div><div>> What we probabl need is a new hook, "pytest_enter_pdb" maybe, which</div><div>> pytest-timeout can implement to switch off timeout  handling.</div><div>> pytest would call this hook in the "pdb.set_trace()" interception</div><div>> code around _pytest/pdb.py:34.</div><div><br></div><div>I like this idea, seems simple enough to implement. :)</div><div><br></div><div>Cheers,</div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Sep 14, 2014 at 12:00 PM, holger krekel <span dir="ltr"><<a href="mailto:holger@merlinux.eu" target="_blank">holger@merlinux.eu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi Wolfgang, Bruno,<br>
<span class=""><br>
On Sat, Sep 13, 2014 at 15:53 -0300, Bruno Oliveira wrote:<br>
> Hi,<br>
><br>
> > 1. Am I missing something or does pytest indeed completely seal off its<br>
> internals?<br>
><br>
> Not really, you can access _pytest module directly:<br>
> >>> import _pytest.pdb<br>
> >>> _pytest.pdb.pytestPDB<br>
> <class _pytest.pdb.pytestPDB at 0x026F0500><br>
<br>
</span>Right, pytest's functionality is implemented in core builtin<br>
plugins living at _pytest/*.py (except for core.py which is the plugin<br>
mechanism itself).  Core and 3rd party plugins expose functions/objects<br>
to be exposed at "pytest.*" via the pytest_namespace hook.  This<br>
approach has advantages but also disadvantages in that it's not easy to<br>
just read the source and discover how pytest startup actually happens.<br>
<span class=""><br>
> > 2. Am I approaching this wrong? How else could I go about achieving my<br>
> goal of disabling the timeout?<br>
><br>
> Personally I would try to implement this in pytest-timeout instead,<br>
> possibly by adding a `disable_all_timeouts()` API function would be called<br>
> automatically when `pdb.set_trace()` is called. This also leaves room for<br>
> other code to disable timeout handling if needed.<br>
<br>
</span>What we probabl need is a new hook, "pytest_enter_pdb" maybe, which<br>
pytest-timeout can implement to switch off timeout  handling.<br>
pytest would call this hook in the "pdb.set_trace()" interception<br>
code around _pytest/pdb.py:34.<br>
<br>
best,<br>
holger<br>
</blockquote></div><br></div></div></div>