Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
208ca707
Commit
208ca707
authored
Aug 09, 2004
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Repair some out-of-date comments.
parent
bb431473
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
8 deletions
+2
-8
Lib/doctest.py
Lib/doctest.py
+2
-8
No files found.
Lib/doctest.py
View file @
208ca707
...
@@ -1279,10 +1279,7 @@ class DocTestRunner:
...
@@ -1279,10 +1279,7 @@ class DocTestRunner:
# any exception that gets raised. (But don't intercept
# any exception that gets raised. (But don't intercept
# keyboard interrupts.)
# keyboard interrupts.)
try
:
try
:
# If the example is a compound statement on one line,
# Don't blink! This is where the user's code gets run.
# like "if 1: print 2", then compile() requires a
# trailing newline. Rather than analyze that, always
# append one (it never hurts).
exec
compile
(
example
.
source
,
"<string>"
,
"single"
,
exec
compile
(
example
.
source
,
"<string>"
,
"single"
,
compileflags
,
1
)
in
test
.
globs
compileflags
,
1
)
in
test
.
globs
exception
=
None
exception
=
None
...
@@ -1291,10 +1288,7 @@ class DocTestRunner:
...
@@ -1291,10 +1288,7 @@ class DocTestRunner:
except
:
except
:
exception
=
sys
.
exc_info
()
exception
=
sys
.
exc_info
()
# Extract the example's actual output from fakeout, and
got
=
self
.
_fakeout
.
getvalue
()
# the actual output
# write it to `got`. Add a terminating newline if it
# doesn't have already one.
got
=
self
.
_fakeout
.
getvalue
()
self
.
_fakeout
.
truncate
(
0
)
self
.
_fakeout
.
truncate
(
0
)
# If the example executed without raising any exceptions,
# If the example executed without raising any exceptions,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment