generalized reprcrash assignment in code.py
This commit is contained in:
parent
e4964ff580
commit
a6bafe8298
|
@ -977,9 +977,7 @@ class FormattedExcinfo:
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
reprtraceback = self.repr_traceback(excinfo_)
|
reprtraceback = self.repr_traceback(excinfo_)
|
||||||
reprcrash: Optional[ReprFileLocation] = (
|
reprcrash = excinfo_._getreprcrash()
|
||||||
excinfo_._getreprcrash() if self.style != "value" else None
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
# Fallback to native repr if the exception doesn't have a traceback:
|
# Fallback to native repr if the exception doesn't have a traceback:
|
||||||
# ExceptionInfo objects require a full traceback to work.
|
# ExceptionInfo objects require a full traceback to work.
|
||||||
|
|
|
@ -445,7 +445,7 @@ class Node(metaclass=NodeMeta):
|
||||||
if isinstance(excinfo.value, ConftestImportFailure):
|
if isinstance(excinfo.value, ConftestImportFailure):
|
||||||
excinfo = ExceptionInfo.from_exc_info(excinfo.value.excinfo)
|
excinfo = ExceptionInfo.from_exc_info(excinfo.value.excinfo)
|
||||||
if isinstance(excinfo.value, fail.Exception):
|
if isinstance(excinfo.value, fail.Exception):
|
||||||
if not excinfo.value.pytrace and style != "line":
|
if not excinfo.value.pytrace:
|
||||||
style = "value"
|
style = "value"
|
||||||
if isinstance(excinfo.value, FixtureLookupError):
|
if isinstance(excinfo.value, FixtureLookupError):
|
||||||
return excinfo.value.formatrepr()
|
return excinfo.value.formatrepr()
|
||||||
|
|
Loading…
Reference in New Issue