On Mon, Mar 14, 2011 at 3:00 PM, Nitin Kumar <nitin.n...@gmail.com> wrote:
> I used this way as explained by you, still getting the same error. > What version of python are you using? Here is the code I tried and it works fine with python 2.6.5 and unittest2 0.5.1. #!/usr/bin/env python import unittest2 class TestIt(unittest2.TestCase): def __init__(self, *args, **kwargs): super(TestIt, self).__init__(*args, **kwargs) self.x = 3 def testit(self): self.assertEqual(self.x, 3) self.assertNotEqual(self.x, 2) if __name__ == '__main__': unittest2.main() _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers