예제 #1
0
 def testSuite(self):
     suite = xunit.TestSuite()
     suite.add(xunit.WasRun("testMethod"))
     suite.add(xunit.WasRun("testBrokenMethod"))
     result = xunit.TestResult()
     suite.run(result)
     assert ("2 run, 1 failed" == result.summary())
예제 #2
0
 def testTemplateMethod(self):
     test = xunit.WasRun("testMethod")
     test.run(self.result)
     assert ("setUp testMethod tearDown " == test.log)
예제 #3
0
 def testFailedResult(self):
     test = xunit.WasRun("testBrokenMethod")
     test.run(self.result)
     assert ("1 run, 1 failed" == self.result.summary())
예제 #4
0
 def testResult(self):
     test = xunit.WasRun("testMethod")
     test.run(self.result)
     assert ("1 run, 0 failed" == self.result.summary())
예제 #5
0
 def testExceptionThrownInSetUp(self):
     test = xunit.WasRun()
예제 #6
0
 def testTearDown(self):
     test = xunit.WasRun("testBrokenMethod")
     test.run(self.result)
     assert ("setUp tearDown " == test.log)