Issue #21740: Support wrapped callables in pydoc. Patch by Claudiu Popa.
diff --git a/Lib/doctest.py b/Lib/doctest.py
index b227952..bb9f432 100644
--- a/Lib/doctest.py
+++ b/Lib/doctest.py
@@ -985,7 +985,8 @@
for valname, val in obj.__dict__.items():
valname = '%s.%s' % (name, valname)
# Recurse to functions & classes.
- if ((inspect.isroutine(val) or inspect.isclass(val)) and
+ if ((inspect.isroutine(inspect.unwrap(val))
+ or inspect.isclass(val)) and
self._from_module(module, val)):
self._find(tests, val, valname, module, source_lines,
globs, seen)