summaryrefslogtreecommitdiff
path: root/Lib/doctest.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-09-06 06:51:57 +0000
committerGeorg Brandl <georg@python.org>2006-09-06 06:51:57 +0000
commit9a1e3897d7462eecdb69109bcc675a88981b4161 (patch)
treed512d90b1e7a26e5edca36a6951183101433b7fd /Lib/doctest.py
parent4b606587eaa5b3f207bbd0013d554e6c747c4de4 (diff)
downloadcpython-9a1e3897d7462eecdb69109bcc675a88981b4161.tar.gz
Patch #1550800: make exec a function.
Diffstat (limited to 'Lib/doctest.py')
-rw-r--r--Lib/doctest.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/doctest.py b/Lib/doctest.py
index bdd284a27d..435e13bc32 100644
--- a/Lib/doctest.py
+++ b/Lib/doctest.py
@@ -1209,8 +1209,8 @@ class DocTestRunner:
# keyboard interrupts.)
try:
# Don't blink! This is where the user's code gets run.
- exec compile(example.source, filename, "single",
- compileflags, 1) in test.globs
+ exec(compile(example.source, filename, "single",
+ compileflags, 1), test.globs)
self.debugger.set_continue() # ==== Example Finished ====
exception = None
except KeyboardInterrupt: