This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author daaku
Recipients daaku
Date 2008-10-04.00:13:23
SpamBayes Score 2.7689497e-05
Marked as misclassified No
Message-id <1223079206.04.0.17382541424.issue4037@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2008-10-04 00:13:26daakusetrecipients: + daaku
2008-10-04 00:13:26daakusetmessageid: <1223079206.04.0.17382541424.issue4037@psf.upfronthosting.co.za>
2008-10-04 00:13:24daakulinkissue4037 messages
2008-10-04 00:13:23daakucreate