From 9df3357ad64faf797b7b88c3af650bc3c974cd5e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 6 Jun 2024 11:00:31 -0400 Subject: [PATCH] Update docstring to reflect current expectation. --- src/_pytest/doctest.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/_pytest/doctest.py b/src/_pytest/doctest.py index e61781acf..5dd220227 100644 --- a/src/_pytest/doctest.py +++ b/src/_pytest/doctest.py @@ -514,11 +514,11 @@ class DoctestModule(Module): if sys.version_info < (3, 11): def _find_lineno(self, obj, source_lines): - """Doctest code does not take into account `@property`, this - is a hackish way to fix it. https://bugs.python.org/issue17446 + """On older Pythons, doctest code does not take into account + `@property`. https://github.com/python/cpython/issues/61648 - Wrapped Doctests will need to be unwrapped so the correct - line number is returned. This will be reported upstream. #8796 + Moreover, wrapped Doctests need to be unwrapped so the correct + line number is returned. #8796 """ if isinstance(obj, property): obj = getattr(obj, "fget", obj)