MCPcopy Create free account
hub / github.com/pytest-dev/pytest / custom_debugger_hook

Function custom_debugger_hook

testing/test_debugging.py:61–81  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59
60@pytest.fixture
61def custom_debugger_hook():
62 called = []
63
64 # install dummy debugger class and track which methods were called on it
65 class _CustomDebugger:
66 def __init__(self, *args, **kwargs):
67 called.append("init")
68
69 def reset(self):
70 called.append("reset")
71
72 def interaction(self, *args):
73 called.append("interaction")
74
75 def set_trace(self, frame):
76 print("**CustomDebugger**")
77 called.append("set_trace")
78
79 _pytest._CustomDebugger = _CustomDebugger # type: ignore
80 yield called
81 del _pytest._CustomDebugger # type: ignore
82
83
84class TestPDB:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected