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
71102ba1
Commit
71102ba1
authored
Dec 12, 1996
by
Barry Warsaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Print final report, either all tests OK, or list of failed and missing
tests.
parent
c1886848
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
5 deletions
+19
-5
Lib/test/autotest.py
Lib/test/autotest.py
+19
-5
No files found.
Lib/test/autotest.py
View file @
71102ba1
...
...
@@ -46,6 +46,7 @@ from test_support import *
# Exception raised when the test failed (not the same as in test_support)
TestFailed
=
'autotest.TestFailed'
TestMissing
=
'autotest.TestMissing'
# defaults
generate
=
0
...
...
@@ -96,8 +97,7 @@ def do_one_test(t, outdir):
try
:
fake_stdout
=
Compare
(
filename
)
except
IOError
:
print
'Could not find output file for test:'
,
t
return
raise
TestMissing
try
:
sys
.
stdout
=
fake_stdout
print
t
...
...
@@ -139,12 +139,26 @@ def main():
else
:
import
testall
tests
=
testall
.
tests
failed
=
[]
missing
=
[]
for
test
in
tests
:
try
:
do_one_test
(
test
,
outdir
)
except
TestFailed
,
msg
:
print
'Failure of test:'
,
test
traceback
.
print_exc
()
failed
.
append
(
test
)
except
TestMissing
:
missing
.
append
(
test
)
print
'**********
\
n
* Report *
\
n
**********'
if
not
failed
and
not
missing
:
print
'All tests OK.'
if
failed
:
print
'Failed tests:'
for
t
in
failed
:
print
' '
,
t
if
missing
:
print
'Missing tests:'
for
t
in
missing
:
print
' '
,
t
main
()
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