summaryrefslogtreecommitdiffstats
path: root/Lib/doctest.py
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2014-12-08 20:00:05 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2014-12-08 20:00:05 (GMT)
commitb532df62b95920c380190f4a468fe15ad0c7d39c (patch)
tree7322c83d48d7c3d00c765f5330725be4dbbb6b51 /Lib/doctest.py
parenta49d6a213e936bc1dcf3bbf098623e86599e59b5 (diff)
downloadcpython-b532df62b95920c380190f4a468fe15ad0c7d39c.zip
cpython-b532df62b95920c380190f4a468fe15ad0c7d39c.tar.gz
cpython-b532df62b95920c380190f4a468fe15ad0c7d39c.tar.bz2
Issue #21740: Support wrapped callables in pydoc. Patch by Claudiu Popa.
Diffstat (limited to 'Lib/doctest.py')
-rw-r--r--Lib/doctest.py3
1 files changed, 2 insertions, 1 deletions
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 @@ 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)