diff options
author | Tim Peters <tim.peters@gmail.com> | 2004-08-09 04:12:36 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2004-08-09 04:12:36 (GMT) |
commit | 208ca7075f9d2e667603fb00c22606e62c575858 (patch) | |
tree | f50353d56e5b39f04a8a63b8ae7bd172735846b9 /Lib | |
parent | bb43147312dd030e0551b6aa34f338fcba7a055c (diff) | |
download | cpython-208ca7075f9d2e667603fb00c22606e62c575858.zip cpython-208ca7075f9d2e667603fb00c22606e62c575858.tar.gz cpython-208ca7075f9d2e667603fb00c22606e62c575858.tar.bz2 |
Repair some out-of-date comments.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/doctest.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/Lib/doctest.py b/Lib/doctest.py index 054ba91..56bf551 100644 --- a/Lib/doctest.py +++ b/Lib/doctest.py @@ -1279,10 +1279,7 @@ class DocTestRunner: # any exception that gets raised. (But don't intercept # keyboard interrupts.) try: - # If the example is a compound statement on one line, - # like "if 1: print 2", then compile() requires a - # trailing newline. Rather than analyze that, always - # append one (it never hurts). + # Don't blink! This is where the user's code gets run. exec compile(example.source, "<string>", "single", compileflags, 1) in test.globs exception = None @@ -1291,10 +1288,7 @@ class DocTestRunner: except: exception = sys.exc_info() - # Extract the example's actual output from fakeout, and - # write it to `got`. Add a terminating newline if it - # doesn't have already one. - got = self._fakeout.getvalue() + got = self._fakeout.getvalue() # the actual output self._fakeout.truncate(0) # If the example executed without raising any exceptions, |