(self, excinfo: ExceptionInfo[BaseException])
| 1721 | self._request._fillfixtures() |
| 1722 | |
| 1723 | def _prunetraceback(self, excinfo: ExceptionInfo[BaseException]) -> None: |
| 1724 | if hasattr(self, "_obj") and not self.config.getoption("fulltrace", False): |
| 1725 | code = _pytest._code.Code.from_function(get_real_func(self.obj)) |
| 1726 | path, firstlineno = code.path, code.firstlineno |
| 1727 | traceback = excinfo.traceback |
| 1728 | ntraceback = traceback.cut(path=path, firstlineno=firstlineno) |
| 1729 | if ntraceback == traceback: |
| 1730 | ntraceback = ntraceback.cut(path=path) |
| 1731 | if ntraceback == traceback: |
| 1732 | ntraceback = ntraceback.filter(filter_traceback) |
| 1733 | if not ntraceback: |
| 1734 | ntraceback = traceback |
| 1735 | |
| 1736 | excinfo.traceback = ntraceback.filter() |
| 1737 | # issue364: mark all but first and last frames to |
| 1738 | # only show a single-line message for each frame. |
| 1739 | if self.config.getoption("tbstyle", "auto") == "auto": |
| 1740 | if len(excinfo.traceback) > 2: |
| 1741 | for entry in excinfo.traceback[1:-1]: |
| 1742 | entry.set_repr_style("short") |
| 1743 | |
| 1744 | # TODO: Type ignored -- breaks Liskov Substitution. |
| 1745 | def repr_failure( # type: ignore[override] |
nothing calls this directly
no test coverage detected