Skip to content

Commit 96ef7d6

Browse files
committed
code: fix outdated reference in ExceptionInfo.exconly docstring
No such thing as `_pytest._code.AssertionError`, it's just the built-in `AssertionError`.
1 parent 5bbfb4e commit 96ef7d6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/_pytest/_code/code.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -562,10 +562,10 @@ def __repr__(self) -> str:
562562
def exconly(self, tryshort: bool = False) -> str:
563563
"""Return the exception as a string.
564564
565-
When 'tryshort' resolves to True, and the exception is a
566-
_pytest._code._AssertionError, only the actual exception part of
567-
the exception representation is returned (so 'AssertionError: ' is
568-
removed from the beginning).
565+
When 'tryshort' resolves to True, and the exception is an
566+
AssertionError, only the actual exception part of the exception
567+
representation is returned (so 'AssertionError: ' is removed from
568+
the beginning).
569569
"""
570570
lines = format_exception_only(self.type, self.value)
571571
text = "".join(lines)

0 commit comments

Comments
 (0)