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

Method test_pdb_custom_cls

testing/test_debugging.py:958–969  ·  view source on GitHub ↗
(self, pytester: Pytester, custom_debugger_hook)

Source from the content-addressed store, hash-verified

956 not SUPPORTS_BREAKPOINT_BUILTIN, reason="Requires breakpoint() builtin"
957 )
958 def test_pdb_custom_cls(self, pytester: Pytester, custom_debugger_hook) -> None:
959 p1 = pytester.makepyfile(
960 """
961 def test_nothing():
962 breakpoint()
963 """
964 )
965 result = pytester.runpytest_inprocess(
966 "--pdb", "--pdbcls=_pytest:_CustomDebugger", p1
967 )
968 result.stdout.fnmatch_lines(["*CustomDebugger*", "*1 passed*"])
969 assert custom_debugger_hook == ["init", "set_trace"]
970
971 @pytest.mark.parametrize("arg", ["--pdb", ""])
972 @pytest.mark.skipif(

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytest_inprocessMethod · 0.45

Tested by

no test coverage detected