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
23efb929
Commit
23efb929
authored
Dec 04, 2004
by
Raymond Hettinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SF bug #1078905: Docs for unittest run() methods are misleading
parent
6b08bba4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
Lib/unittest.py
Lib/unittest.py
+5
-4
Misc/NEWS
Misc/NEWS
+4
-0
No files found.
Lib/unittest.py
View file @
23efb929
...
@@ -277,7 +277,8 @@ class TestCase:
...
@@ -277,7 +277,8 @@ class TestCase:
finally
:
finally
:
result
.
stopTest
(
self
)
result
.
stopTest
(
self
)
__call__
=
run
def
__call__
(
self
,
*
args
,
**
kwds
):
return
self
.
run
(
*
args
,
**
kwds
)
def
debug
(
self
):
def
debug
(
self
):
"""Run the test without collecting errors in a TestResult"""
"""Run the test without collecting errors in a TestResult"""
...
@@ -417,15 +418,15 @@ class TestSuite:
...
@@ -417,15 +418,15 @@ class TestSuite:
self
.
addTest
(
test
)
self
.
addTest
(
test
)
def
run
(
self
,
result
):
def
run
(
self
,
result
):
return
self
(
result
)
def
__call__
(
self
,
result
):
for
test
in
self
.
_tests
:
for
test
in
self
.
_tests
:
if
result
.
shouldStop
:
if
result
.
shouldStop
:
break
break
test
(
result
)
test
(
result
)
return
result
return
result
def
__call__
(
self
,
*
args
,
**
kwds
):
return
self
.
run
(
*
args
,
**
kwds
)
def
debug
(
self
):
def
debug
(
self
):
"""Run the tests without collecting errors in a TestResult"""
"""Run the tests without collecting errors in a TestResult"""
for
test
in
self
.
_tests
:
test
.
debug
()
for
test
in
self
.
_tests
:
test
.
debug
()
...
...
Misc/NEWS
View file @
23efb929
...
@@ -21,6 +21,10 @@ Extension Modules
...
@@ -21,6 +21,10 @@ Extension Modules
Library
Library
-------
-------
- unittest.TestCase.run() and unittest.TestSuite.run() can now be successfully
extended or overridden by subclasses. Formerly, the subclassed method would
be ignored by the rest of the module. (Bug #1078905).
- the deprecated whrandom module was removed. Use the random module instead.
- the deprecated whrandom module was removed. Use the random module instead.
- heapq.nsmallest() and heapq.nlargest() now support key= arguments with
- heapq.nsmallest() and heapq.nlargest() now support key= arguments with
...
...
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