code: fix outdated reference in ExceptionInfo.exconly docstring
No such thing as `_pytest._code.AssertionError`, it's just the built-in `AssertionError`.
This commit is contained in:
parent
5bbfb4e058
commit
96ef7d678b
|
@ -562,10 +562,10 @@ class ExceptionInfo(Generic[E]):
|
|||
def exconly(self, tryshort: bool = False) -> str:
|
||||
"""Return the exception as a string.
|
||||
|
||||
When 'tryshort' resolves to True, and the exception is a
|
||||
_pytest._code._AssertionError, only the actual exception part of
|
||||
the exception representation is returned (so 'AssertionError: ' is
|
||||
removed from the beginning).
|
||||
When 'tryshort' resolves to True, and the exception is an
|
||||
AssertionError, only the actual exception part of the exception
|
||||
representation is returned (so 'AssertionError: ' is removed from
|
||||
the beginning).
|
||||
"""
|
||||
lines = format_exception_only(self.type, self.value)
|
||||
text = "".join(lines)
|
||||
|
|
Loading…
Reference in New Issue