diff options
author | Michael Foord <michael@voidspace.org.uk> | 2012-09-28 13:14:03 (GMT) |
---|---|---|
committer | Michael Foord <michael@voidspace.org.uk> | 2012-09-28 13:14:03 (GMT) |
commit | 7a1901f86129dc15dc9004da02907eb1c90f32fa (patch) | |
tree | 12939625eaef91a32648cd94b051f5c62b80ceea /Lib/unittest/test | |
parent | 57491e0703ab46f6f4f43e534750611d96be1aa2 (diff) | |
download | cpython-7a1901f86129dc15dc9004da02907eb1c90f32fa.zip cpython-7a1901f86129dc15dc9004da02907eb1c90f32fa.tar.gz cpython-7a1901f86129dc15dc9004da02907eb1c90f32fa.tar.bz2 |
Closes issue #12376 : Pass on parameters in unittest.TextTestResult.__init__ super call
Diffstat (limited to 'Lib/unittest/test')
-rw-r--r-- | Lib/unittest/test/test_runner.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Lib/unittest/test/test_runner.py b/Lib/unittest/test/test_runner.py index 8e95410..aed1e76 100644 --- a/Lib/unittest/test/test_runner.py +++ b/Lib/unittest/test/test_runner.py @@ -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): |