def addClassTestCase(self, cls, name): testcase = TestCaseData() testcase.classname = cls testcase.name = name testcase.nameParts.append(name) self.testcases.append(testcase) return testcase
def addClassTestCase(self, cls, name): testcase = TestCaseData() testcase.classname = cls testcase.name = name testcase.nameParts.append(name) self.testcases.append(testcase) return testcase
def testTestRunEquality(self): c1 = TestConditionData() c2 = TestConditionData() c1.filenamePrefix = "..\\..\\Test" c2.filenamePrefix = "..\\..\\Junk" t1 = TestCaseData() t2 = TestCaseData() t1.name = "Test 1" t2.name = "Test 1" t1.conditions.append(c1) t1.conditions.append(c2) t2.conditions.append(c1) t2.conditions.append(c2) r1 = TestRunData() r2 = TestRunData() r1.appname = "One" r2.appname = "One" self.assertTrue(r1 == r2) r1.testcases.append(t1) self.assertFalse(r1 == r2) r2.testcases.append(t2) self.assertTrue(r1 == r2) c3 = TestConditionData() c3.filenamePrefix = "..\\..\\Fail" t2.conditions.append(c3) self.assertFalse(r1 == r2)
def testTestCaseEquality(self): c1 = TestConditionData() c2 = TestConditionData() c1.filenamePrefix = "..\\..\\Test" c2.filenamePrefix = "..\\..\\Junk" t1 = TestCaseData() t2 = TestCaseData() t1.name = "Test 1" t2.name = "Test 1" t1.conditions.append(c1) t1.conditions.append(c2) t2.conditions.append(c1) t2.conditions.append(c2) self.assertTrue(t1 == t2) c3 = TestConditionData() c3.filenamePrefix = "..\\..\\Fail" t2.conditions.append(c3) self.assertFalse(t1 == t2) t1.conditions.append(c3) self.assertTrue(t1 == t2) t2.name = "Test 2" self.assertFalse(t1 == t2)
def testTestRunEquality(self): c1 = TestConditionData() c2 = TestConditionData() c1.filenamePrefix = "..\\..\\Test" c2.filenamePrefix = "..\\..\\Junk" t1 = TestCaseData() t2 = TestCaseData() t1.name = "Test 1" t2.name = "Test 1" t1.conditions.append(c1) t1.conditions.append(c2) t2.conditions.append(c1) t2.conditions.append(c2) r1 = TestRunData() r2 = TestRunData() r1.appname = "One" r2.appname = "One" self.assertTrue(r1 == r2) r1.testcases.append(t1) self.assertFalse(r1 == r2) r2.testcases.append(t2) self.assertTrue(r1 == r2) c3 = TestConditionData() c3.filenamePrefix = "..\\..\\Fail" t2.conditions.append(c3) self.assertFalse(r1 == r2)
def addTestCase(self, name): testcase = TestCaseData() testcase.name = name testcase.nameParts.append(name) self.testcases.append(testcase) return testcase
def addTestCase(self, name): testcase = TestCaseData() testcase.name = name testcase.nameParts.append(name) self.testcases.append(testcase) return testcase