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

Method get_exconly

src/_pytest/_code/code.py:759–774  ·  view source on GitHub ↗
(
        self,
        excinfo: ExceptionInfo[BaseException],
        indent: int = 4,
        markall: bool = False,
    )

Source from the content-addressed store, hash-verified

757 return lines
758
759 def get_exconly(
760 self,
761 excinfo: ExceptionInfo[BaseException],
762 indent: int = 4,
763 markall: bool = False,
764 ) -> List[str]:
765 lines = []
766 indentstr = " " * indent
767 # Get the real exception information out.
768 exlines = excinfo.exconly(tryshort=True).split("\n")
769 failindent = self.fail_marker + indentstr[1:]
770 for line in exlines:
771 lines.append(failindent + line)
772 if not markall:
773 failindent = indentstr
774 return lines
775
776 def repr_locals(self, locals: Mapping[str, object]) -> Optional["ReprLocals"]:
777 if self.showlocals:

Callers 2

get_sourceMethod · 0.95
repr_traceback_entryMethod · 0.95

Calls 2

exconlyMethod · 0.80
appendMethod · 0.80

Tested by

no test coverage detected