Index: Lib/doctest.py =================================================================== --- Lib/doctest.py (revision 73236) +++ Lib/doctest.py (working copy) @@ -812,7 +812,7 @@ # DocTestFinder._find_lineno to find the line number for a # given object's docstring. try: - file = inspect.getsourcefile(obj) or inspect.getfile(obj) + file = inspect.getsourcefile(obj) if module is not None: # Supply the module globals in case the module was # originally loaded via a PEP 302 loader and