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

Method getcrashentry

src/_pytest/_code/code.py:411–417  ·  view source on GitHub ↗

Return last non-hidden traceback entry that lead to the exception of a traceback.

(self)

Source from the content-addressed store, hash-verified

409 return Traceback(filter(fn, self), self._excinfo)
410
411 def getcrashentry(self) -> TracebackEntry:
412 """Return last non-hidden traceback entry that lead to the exception of a traceback."""
413 for i in range(-1, -len(self) - 1, -1):
414 entry = self[i]
415 if not entry.ishidden():
416 return entry
417 return self[-1]
418
419 def recursionindex(self) -> Optional[int]:
420 """Return the index of the frame/TracebackEntry where recursion originates if

Callers 3

_getreprcrashMethod · 0.80

Calls 1

ishiddenMethod · 0.80