diff --git a/src/_pytest/doctest.py b/src/_pytest/doctest.py index 475df507a..4eb2c1991 100644 --- a/src/_pytest/doctest.py +++ b/src/_pytest/doctest.py @@ -538,7 +538,7 @@ class DoctestModule(Module): https://github.com/python/cpython/issues/69718 """ if _is_mocked(obj): - return + return # pragma: no cover with _patch_unwrap_mock_aware(): # Type ignored because this is a private function. super()._find( # type:ignore[misc]