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

Method __repr__

src/_pytest/_code/code.py:570–575  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

568 self._traceback = value
569
570 def __repr__(self) -> str:
571 if self._excinfo is None:
572 return "<ExceptionInfo for raises contextmanager>"
573 return "<{} {} tblen={}>".format(
574 self.__class__.__name__, saferepr(self._excinfo[1]), len(self.traceback)
575 )
576
577 def exconly(self, tryshort: bool = False) -> str:
578 """Return the exception as a string.

Callers

nothing calls this directly

Calls 2

safereprFunction · 0.90
formatMethod · 0.45

Tested by

no test coverage detected