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:
|
def exconly(self, tryshort: bool = False) -> str:
|
||||||
"""Return the exception as a string.
|
"""Return the exception as a string.
|
||||||
|
|
||||||
When 'tryshort' resolves to True, and the exception is a
|
When 'tryshort' resolves to True, and the exception is an
|
||||||
_pytest._code._AssertionError, only the actual exception part of
|
AssertionError, only the actual exception part of the exception
|
||||||
the exception representation is returned (so 'AssertionError: ' is
|
representation is returned (so 'AssertionError: ' is removed from
|
||||||
removed from the beginning).
|
the beginning).
|
||||||
"""
|
"""
|
||||||
lines = format_exception_only(self.type, self.value)
|
lines = format_exception_only(self.type, self.value)
|
||||||
text = "".join(lines)
|
text = "".join(lines)
|
||||||
|
|
Loading…
Reference in New Issue