()
| 59 | |
| 60 | @pytest.fixture |
| 61 | def 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 | |
| 84 | class TestPDB: |
nothing calls this directly
no outgoing calls
no test coverage detected