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

Method test_pdb_on_fail

testing/test_debugging.py:97–108  ·  view source on GitHub ↗
(self, pytester: Pytester, pdblist)

Source from the content-addressed store, hash-verified

95 return pdblist
96
97 def test_pdb_on_fail(self, pytester: Pytester, pdblist) -> None:
98 rep = runpdb_and_get_report(
99 pytester,
100 """
101 def test_func():
102 assert 0
103 """,
104 )
105 assert rep.failed
106 assert len(pdblist) == 1
107 tb = _pytest._code.Traceback(pdblist[0][0])
108 assert tb[-1].name == "test_func"
109
110 def test_pdb_on_xfail(self, pytester: Pytester, pdblist) -> None:
111 rep = runpdb_and_get_report(

Callers

nothing calls this directly

Calls 1

runpdb_and_get_reportFunction · 0.85

Tested by

no test coverage detected