diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-11-19 22:38:29 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-11-19 22:38:29 (GMT) |
commit | 6cadba718fb39c797f67c34e1755c0f13d4b0a2a (patch) | |
tree | 178e39be578a0a1b32ce280639ab487e4665d5fd /Lib/doctest.py | |
parent | 0f3641ce88025b5e41e80d1cb73d6f5751785e38 (diff) | |
download | cpython-6cadba718fb39c797f67c34e1755c0f13d4b0a2a.zip cpython-6cadba718fb39c797f67c34e1755c0f13d4b0a2a.tar.gz cpython-6cadba718fb39c797f67c34e1755c0f13d4b0a2a.tar.bz2 |
Merged revisions 67243,67245,67277-67278,67289 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r67243 | benjamin.peterson | 2008-11-17 15:39:05 -0600 (Mon, 17 Nov 2008) | 1 line
a few fixes on the download page
........
r67245 | benjamin.peterson | 2008-11-17 16:05:19 -0600 (Mon, 17 Nov 2008) | 1 line
improve __hash__ docs
........
r67277 | skip.montanaro | 2008-11-18 21:35:41 -0600 (Tue, 18 Nov 2008) | 1 line
patch from issue 1108
........
r67278 | georg.brandl | 2008-11-19 01:59:09 -0600 (Wed, 19 Nov 2008) | 2 lines
Try to fix problems with verbatim.
........
r67289 | brett.cannon | 2008-11-19 14:29:39 -0600 (Wed, 19 Nov 2008) | 2 lines
Ignore .pyc and .pyo files.
........
Diffstat (limited to 'Lib/doctest.py')
-rw-r--r-- | Lib/doctest.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/doctest.py b/Lib/doctest.py index e8babd2..22052ec 100644 --- a/Lib/doctest.py +++ b/Lib/doctest.py @@ -847,12 +847,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.__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): |