def test_run(self): result = unittest.TestResult() suite = subunit.IsolatedTestSuite() sub_suite = unittest.TestSuite() sub_suite.addTest(self.SampleTestToIsolate("test_sets_global_state")) sub_suite.addTest(self.SampleTestToIsolate("test_sets_global_state")) suite.addTest(sub_suite) suite.addTest(self.SampleTestToIsolate("test_sets_global_state")) suite.run(result) self.assertEqual(result.testsRun, 3) self.assertEqual(self.SampleTestToIsolate.SETUP, False) self.assertEqual(self.SampleTestToIsolate.TEARDOWN, False) self.assertEqual(self.SampleTestToIsolate.TEST, False)
def test_construct(self): subunit.IsolatedTestSuite()