]> granicus.if.org Git - python/commitdiff
make sure doctest doesn't pollute __builtins__
authorBenjamin Peterson <benjamin@python.org>
Tue, 29 Jul 2008 15:35:08 +0000 (15:35 +0000)
committerBenjamin Peterson <benjamin@python.org>
Tue, 29 Jul 2008 15:35:08 +0000 (15:35 +0000)
This was causing test_builtin to fail after the decimal doctests were run
see #3462

Lib/doctest.py

index 476c718f023cb16273ec29baa7a37533380e8b29..64a0375da31e2b4c68b9f49bc633a252c493c662 100644 (file)
@@ -1360,6 +1360,7 @@ class DocTestRunner:
             linecache.getlines = self.save_linecache_getlines
             if clear_globs:
                 test.globs.clear()
+                __builtins__['_'] = None
 
     #/////////////////////////////////////////////////////////////////
     # Summarization