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
bf2ad346
Commit
bf2ad346
authored
Sep 28, 2012
by
Michael Foord
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass on parameters in unittest.TextTestResult.__init__ super call
parent
fb2e8a7c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
1 deletion
+16
-1
Lib/unittest/runner.py
Lib/unittest/runner.py
+1
-1
Lib/unittest/test/test_runner.py
Lib/unittest/test/test_runner.py
+13
-0
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Lib/unittest/runner.py
View file @
bf2ad346
...
...
@@ -34,7 +34,7 @@ class TextTestResult(result.TestResult):
separator2
=
'-'
*
70
def
__init__
(
self
,
stream
,
descriptions
,
verbosity
):
super
(
TextTestResult
,
self
).
__init__
()
super
(
TextTestResult
,
self
).
__init__
(
stream
,
descriptions
,
verbosity
)
self
.
stream
=
stream
self
.
showAll
=
verbosity
>
1
self
.
dots
=
verbosity
==
1
...
...
Lib/unittest/test/test_runner.py
View file @
bf2ad346
...
...
@@ -149,6 +149,19 @@ class Test_TextTestRunner(unittest.TestCase):
self
.
assertEqual
(
runner
.
resultclass
,
unittest
.
TextTestResult
)
def
test_multiple_inheritance
(
self
):
class
AResult
(
unittest
.
TestResult
):
def
__init__
(
self
,
stream
,
descriptions
,
verbosity
):
super
(
AResult
,
self
).
__init__
(
stream
,
descriptions
,
verbosity
)
class
ATextResult
(
unittest
.
TextTestResult
,
AResult
):
pass
# This used to raise an exception due to TextTestResult not passing
# on arguments in its __init__ super call
ATextResult
(
None
,
None
,
None
)
def
testBufferAndFailfast
(
self
):
class
Test
(
unittest
.
TestCase
):
def
testFoo
(
self
):
...
...
Misc/NEWS
View file @
bf2ad346
...
...
@@ -107,6 +107,8 @@ Core and Builtins
Library
-------
- Issue #12376: Pass on parameters in TextTestResult.__init__ super call
- Issue #15222: Insert blank line after each message in mbox mailboxes
- Issue #16013: Fix CSV Reader parsing issue with ending quote characters.
...
...
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