| 1033 | return self |
| 1034 | |
| 1035 | def notify_exception( |
| 1036 | self, |
| 1037 | excinfo: ExceptionInfo[BaseException], |
| 1038 | option: Optional[argparse.Namespace] = None, |
| 1039 | ) -> None: |
| 1040 | if option and getattr(option, "fulltrace", False): |
| 1041 | style: _TracebackStyle = "long" |
| 1042 | else: |
| 1043 | style = "native" |
| 1044 | excrepr = excinfo.getrepr( |
| 1045 | funcargs=True, showlocals=getattr(option, "showlocals", False), style=style |
| 1046 | ) |
| 1047 | res = self.hook.pytest_internalerror(excrepr=excrepr, excinfo=excinfo) |
| 1048 | if not any(res): |
| 1049 | for line in str(excrepr).split("\n"): |
| 1050 | sys.stderr.write("INTERNALERROR> %s\n" % line) |
| 1051 | sys.stderr.flush() |
| 1052 | |
| 1053 | def cwd_relative_nodeid(self, nodeid: str) -> str: |
| 1054 | # nodeid's are relative to the rootpath, compute relative to cwd. |