make sure doctest doesn't pollute __builtins__

This was causing test_builtin to fail after the decimal doctests were run
see #3462
This commit is contained in:
Benjamin Peterson 2008-07-29 15:35:08 +00:00
parent e14039cfca
commit 638c722228
1 changed files with 1 additions and 0 deletions

View File

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