~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_selftest.py

  • Committer: Vincent Ladeuil
  • Date: 2012-08-04 11:16:14 UTC
  • mto: This revision was merged to the branch mainline in revision 6553.
  • Revision ID: v.ladeuil+lp@free.fr-20120804111614-qvkz61424f4u1j0a
Use super() instead of calling <base>.setup(self), as the original fix illustrated a too-easy-to-fall-into trap.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1131
1131
        class SkippedTest(tests.TestCase):
1132
1132
 
1133
1133
            def setUp(self):
1134
 
                tests.TestCase.setUp(self)
 
1134
                super(SkippedTest, self).setUp()
1135
1135
                calls.append('setUp')
1136
1136
                self.addCleanup(self.cleanup)
1137
1137
 
1630
1630
        class Test(tests.TestCase):
1631
1631
 
1632
1632
            def setUp(self):
1633
 
                tests.TestCase.setUp(self)
 
1633
                super(Test, self).setUp()
1634
1634
                self.orig = self.overrideAttr(obj, 'test_attr')
1635
1635
 
1636
1636
            def test_value(self):
1649
1649
        class Test(tests.TestCase):
1650
1650
 
1651
1651
            def setUp(self):
1652
 
                tests.TestCase.setUp(self)
 
1652
                super(Test, self).setUp()
1653
1653
                self.orig = self.overrideAttr(obj, 'test_attr', new='modified')
1654
1654
 
1655
1655
            def test_value(self):
2602
2602
class TestSelftestFiltering(tests.TestCase):
2603
2603
 
2604
2604
    def setUp(self):
2605
 
        tests.TestCase.setUp(self)
 
2605
        super(TestSelftestFiltering, self).setUp()
2606
2606
        self.suite = TestUtil.TestSuite()
2607
2607
        self.loader = TestUtil.TestLoader()
2608
2608
        self.suite.addTest(self.loader.loadTestsFromModule(