summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-07-29 15:35:08 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-07-29 15:35:08 (GMT)
commit638c722228940d62662f2337ed4c47c30afed37a (patch)
treeca0f4d0cb31c5941a1402846b84ec0785a1d8b2b /Lib
parente14039cfca77046df82dd09ec4ecd37e9c0cc25b (diff)
downloadcpython-638c722228940d62662f2337ed4c47c30afed37a.zip
cpython-638c722228940d62662f2337ed4c47c30afed37a.tar.gz
cpython-638c722228940d62662f2337ed4c47c30afed37a.tar.bz2
make sure doctest doesn't pollute __builtins__
This was causing test_builtin to fail after the decimal doctests were run see #3462
Diffstat (limited to 'Lib')
-rw-r--r--Lib/doctest.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/doctest.py b/Lib/doctest.py
index 476c718..64a0375 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