MCPcopy
hub / github.com/pytest-dev/pytest / test_pdb_on_fail

Method test_pdb_on_fail

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

Source from the content-addressed store, hash-verified

114 return pdblist
115
116 def test_pdb_on_fail(self, pytester: Pytester, pdblist) -> None:
117 rep = runpdb_and_get_report(
118 pytester,
119 """
120 def test_func():
121 assert 0
122 """,
123 )
124 assert rep.failed
125 assert len(pdblist) == 1
126 if sys.version_info < (3, 13):
127 tb = _pytest._code.Traceback(pdblist[0][0])
128 else:
129 tb = _pytest._code.Traceback(pdblist[0][0].__traceback__)
130 assert tb[-1].name == "test_func"
131
132 def test_pdb_on_xfail(self, pytester: Pytester, pdblist) -> None:
133 rep = runpdb_and_get_report(

Callers

nothing calls this directly

Calls 1

runpdb_and_get_reportFunction · 0.85

Tested by

no test coverage detected