On Mon, Mar 14, 2011 at 1:56 PM, Nitin Kumar <nitin.n...@gmail.com> wrote:
> See below small example. I am trying to have one constructor for a class > with unittest inherited. Avoid overriding the constructor of TestCase. That is not recommended. > self.x = 3 Put this is "setUp" instead of the constructor *unittest2.TestCase.__init__(self) > If you must do this, the correct way of doing it is: def __init__(self, *args, **kwargs): super(XMLSupport, self).__init__(*args, **kwargs) self.x = 3 _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers