mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Closes issue #12376 : Pass on parameters in unittest.TextTestResult.__init__ super call
This commit is contained in:
parent
57491e0703
commit
7a1901f861
3 changed files with 16 additions and 1 deletions
|
|
@ -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, 1)
|
||||
|
||||
|
||||
def testBufferAndFailfast(self):
|
||||
class Test(unittest.TestCase):
|
||||
def testFoo(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue