patch from issue 1108
This commit is contained in:
parent
7cfe7ea745
commit
7fb29797e3
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue