From: Benjamin Peterson Date: Tue, 29 Jul 2008 15:35:08 +0000 (+0000) Subject: make sure doctest doesn't pollute __builtins__ X-Git-Tag: v3.0b3~221 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=638c722228940d62662f2337ed4c47c30afed37a;p=python make sure doctest doesn't pollute __builtins__ This was causing test_builtin to fail after the decimal doctests were run see #3462 --- diff --git a/Lib/doctest.py b/Lib/doctest.py index 476c718f02..64a0375da3 100644 --- a/Lib/doctest.py +++ b/Lib/doctest.py @@ -1360,6 +1360,7 @@ class DocTestRunner: linecache.getlines = self.save_linecache_getlines if clear_globs: test.globs.clear() + __builtins__['_'] = None #///////////////////////////////////////////////////////////////// # Summarization