Skip to content

Commit 38e933b

Browse files
committed
fix: pytest.hookspec.pytest_enter_pdb expects a pdb (keyword) argument
Pass down the current `pudb` instance, received via `self._pudb_get_debugger` Fixes: > ``` > ===================================== warnings summary ====================================== > .../tests/test_sanity.py::test_sanity > .../.venv/lib/python3.9/site-packages/pytest_pudb.py:55: UserWarning: > > Argument(s) ('pdb',) which are declared in the hookspec can not be found in this hook call > > -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html > ``` Source: https://docs.pytest.org/en/latest/reference/reference.html#pytest.hookspec.pytest_enter_pdb Signed-off-by: Stavros Ntentos <[email protected]>
1 parent a6b3d2f commit 38e933b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pytest_pudb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def disable_io_capture(self):
5252
tw = self.pluginmanager.getplugin("terminalreporter")._tw
5353
tw.line()
5454
tw.sep(">", "entering PuDB (IO-capturing turned off)")
55-
self.pluginmanager.hook.pytest_enter_pdb(config=self.config)
55+
self.pluginmanager.hook.pytest_enter_pdb(config=self.config, pdb=self._pudb_get_debugger)
5656

5757
def _get_debugger(self, **kwargs):
5858
self.disable_io_capture()

0 commit comments

Comments
 (0)