Discussion:
[Python-3000-checkins] r65285 - python/branches/py3k/Lib/doctest.py
benjamin.peterson
2008-07-29 15:35:09 UTC
Permalink
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

Loading...