def test_flatten_respects_class_fixtures(self): sys.path.append(support_file('scenario/class_fixtures')) import test_cf_testcase as mod suite = unittest.TestSuite() suite.addTest(mod.Test('test_1')) suite.addTest(mod.Test('test_2')) suite.addTest(mod.Test2('test_1')) suite.addTest(mod.Test2('test_2')) flat = list(self.plugin._flatten(suite)) self.assertEqual(flat, [ 'test_cf_testcase.Test2.test_1', 'test_cf_testcase.Test2.test_2', 'test_cf_testcase.Test', ])
def test_flatten_respects_class_fixtures(self): sys.path.append(support_file("scenario/class_fixtures")) import test_cf_testcase as mod suite = unittest.TestSuite() suite.addTest(mod.Test("test_1")) suite.addTest(mod.Test("test_2")) suite.addTest(mod.Test2("test_1")) suite.addTest(mod.Test2("test_2")) suite.addTest(mod.Test3("test_3")) flat = list(self.plugin._flatten(suite)) self.assertEqual( flat, [ "test_cf_testcase.Test2.test_1", "test_cf_testcase.Test2.test_2", "test_cf_testcase.Test", "test_cf_testcase.Test3", ], )