mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #21740: Support wrapped callables in pydoc. Patch by Claudiu Popa.
This commit is contained in:
parent
a49d6a213e
commit
b532df62b9
3 changed files with 22 additions and 2 deletions
|
@ -985,7 +985,8 @@ class DocTestFinder:
|
|||
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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue