Author terry.reedy
Recipients branker, michael.foord, rhettinger, terry.reedy
Date 2011-06-25.00:22:49
SpamBayes Score 4.41344e-09
Marked as misclassified No
Message-id <>
Running your code with 2.7.2 gives:
Traceback (most recent call last):
  File "C:\Programs\Python27\misc\", line 41, in <module>
  File "C:\Programs\Python27\lib\unittest\", line 95, in __init__
  File "C:\Programs\Python27\lib\unittest\", line 229, in runTests
    self.result =
  File "C:\Programs\Python27\lib\unittest\", line 142, in run
    result = self._makeResult()
  File "C:\Programs\Python27\lib\unittest\", line 138, in _makeResult
    return self.resultclass(, self.descriptions, self.verbosity)
  File "C:\Programs\Python27\lib\unittest\", line 37, in __init__
    super(TextTestResult, self).__init__()
TypeError: __init__() takes exactly 4 arguments (1 given)

Nothing 'explodes', just a normal exception due to what I believe is a programming error on your part that has nothing to do with unittest. The doc for super says
"The second use case is to support cooperative multiple inheritance in a dynamic execution environment. This use case is unique to Python and is not found in statically compiled languages or languages that only support single inheritance. This makes it possible to implement “diamond diagrams” where multiple base classes implement the same method. Good design dictates that this method have the same calling signature in every case (because the order of calls is determined at runtime, because that order adapts to changes in the class hierarchy, and because that order can include sibling classes that are unknown prior to runtime).""

The various __init__ methods, as you know, have different and incompatible calling signatures, hence the exception. I believe this should be closed as invalid. Raymond, as super expert, do I have this right?
Date User Action Args
2011-06-25 00:22:50terry.reedysetrecipients: + terry.reedy, rhettinger, michael.foord, branker
2011-06-25 00:22:50terry.reedysetmessageid: <>
2011-06-25 00:22:49terry.reedylinkissue12376 messages
2011-06-25 00:22:49terry.reedycreate