patch from issue 1108

This commit is contained in:
Skip Montanaro 2008-11-19 03:35:41 +00:00
parent 7cfe7ea745
commit 7fb29797e3
1 changed files with 2 additions and 2 deletions

View File

@ -854,12 +854,12 @@ class DocTestFinder:
"""
if module is None:
return True
elif inspect.getmodule(object) is not None:
return module is inspect.getmodule(object)
elif inspect.isfunction(object):
return module.__dict__ is object.func_globals
elif inspect.isclass(object):
return module.__name__ == object.__module__
elif inspect.getmodule(object) is not None:
return module is inspect.getmodule(object)
elif hasattr(object, '__module__'):
return module.__name__ == object.__module__
elif isinstance(object, property):