[Python-3000-checkins] r65285 - python/branches/py3k/Lib/doctest.py

benjamin.peterson python-3000-checkins at python.org
Tue Jul 29 17:35:09 CEST 2008


Author: benjamin.peterson
Date: Tue Jul 29 17:35:08 2008
New Revision: 65285

Log:
make sure doctest doesn't pollute __builtins__

This was causing test_builtin to fail after the decimal doctests were run
see #3462


Modified:
   python/branches/py3k/Lib/doctest.py

Modified: python/branches/py3k/Lib/doctest.py
==============================================================================
--- python/branches/py3k/Lib/doctest.py	(original)
+++ python/branches/py3k/Lib/doctest.py	Tue Jul 29 17:35:08 2008
@@ -1360,6 +1360,7 @@
             linecache.getlines = self.save_linecache_getlines
             if clear_globs:
                 test.globs.clear()
+                __builtins__['_'] = None
 
     #/////////////////////////////////////////////////////////////////
     # Summarization


More information about the Python-3000-checkins mailing list