summaryrefslogtreecommitdiffstats
path: root/Lib/unittest
diff options
context:
space:
mode:
authorMichael Foord <michael@voidspace.org.uk>2012-09-28 14:19:45 (GMT)
committerMichael Foord <michael@voidspace.org.uk>2012-09-28 14:19:45 (GMT)
commit8ef1fcecc546f254e8b55d50ef82a433fc280641 (patch)
tree593182c000b1bcbd018e01f1f25cd4380d0ac721 /Lib/unittest
parentd38e6e516de30158e4bb4e32961c3889f2f69339 (diff)
parent7a1901f86129dc15dc9004da02907eb1c90f32fa (diff)
downloadcpython-8ef1fcecc546f254e8b55d50ef82a433fc280641.zip
cpython-8ef1fcecc546f254e8b55d50ef82a433fc280641.tar.gz
cpython-8ef1fcecc546f254e8b55d50ef82a433fc280641.tar.bz2
Merge
Diffstat (limited to 'Lib/unittest')
-rw-r--r--Lib/unittest/runner.py2
-rw-r--r--Lib/unittest/test/test_runner.py13
2 files changed, 14 insertions, 1 deletions
diff --git a/Lib/unittest/runner.py b/Lib/unittest/runner.py
index 10c4778..28b8865 100644
--- a/Lib/unittest/runner.py
+++ b/Lib/unittest/runner.py
@@ -35,7 +35,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
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):