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
e3eaef30
Commit
e3eaef30
authored
Mar 22, 2001
by
Steve Purcell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated to latest PyUnit version (1.31 in PyUnit CVS); test_support.py
changed accordingly.
parent
4a0cab02
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
244 additions
and
256 deletions
+244
-256
Lib/test/test_support.py
Lib/test/test_support.py
+6
-10
Lib/unittest.py
Lib/unittest.py
+238
-246
No files found.
Lib/test/test_support.py
View file @
e3eaef30
...
...
@@ -102,12 +102,9 @@ def check_syntax(statement):
import
unittest
class
BasicTestRunner
(
unittest
.
VerboseTextTestRunner
):
def
__init__
(
self
,
stream
=
sys
.
stderr
):
unittest
.
VerboseTextTestRunner
.
__init__
(
self
,
stream
,
descriptions
=
0
)
class
BasicTestRunner
:
def
run
(
self
,
test
):
result
=
unittest
.
_VerboseTextTestResult
(
self
.
stream
,
descriptions
=
0
)
result
=
unittest
.
TestResult
(
)
test
(
result
)
return
result
...
...
@@ -115,13 +112,12 @@ class BasicTestRunner(unittest.VerboseTextTestRunner):
def
run_unittest
(
testclass
):
"""Run tests from a unittest.TestCase-derived class."""
if
verbose
:
f
=
sys
.
stdout
runner
=
unittest
.
TextTestRunner
(
sys
.
stdout
,
descriptions
=
0
)
else
:
import
StringIO
f
=
StringIO
.
StringIO
()
runner
=
BasicTestRunner
()
suite
=
unittest
.
makeSuite
(
testclass
)
result
=
BasicTestRunner
(
stream
=
f
)
.
run
(
suite
)
if
result
.
errors
or
result
.
failures
:
result
=
runner
.
run
(
suite
)
if
not
result
.
wasSuccessful
()
:
raise
TestFailed
(
"errors occurred in %s.%s"
%
(
testclass
.
__module__
,
testclass
.
__name__
))
Lib/unittest.py
View file @
e3eaef30
This diff is collapsed.
Click to expand it.
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