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