Message74285
doctest.py currently does not include doctests from method descriptors
in a class.
The patch is simple, in the _find function in class DocTestFinder:
Original:
# Recurse to methods, properties, and nested classes.
if ((inspect.isfunction(val) or inspect.isclass(val) or
isinstance(val, property)) and
self._from_module(module, val)):
Patched:
# Recurse to methods, properties, and nested classes.
if ((inspect.isfunction(val) or inspect.isclass(val) or
inspect.ismethoddescriptor(val) or
isinstance(val, property)) and
self._from_module(module, val)):
Adding the "inspect.ismethoddescriptor(val) or" line. |
|
Date |
User |
Action |
Args |
2008-10-04 00:13:26 | daaku | set | recipients:
+ daaku |
2008-10-04 00:13:26 | daaku | set | messageid: <1223079206.04.0.17382541424.issue4037@psf.upfronthosting.co.za> |
2008-10-04 00:13:24 | daaku | link | issue4037 messages |
2008-10-04 00:13:23 | daaku | create | |
|