Beispiel #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())
Beispiel #2
0
 def testTemplateMethod(self):
     test = xunit.WasRun("testMethod")
     test.run(self.result)
     assert ("setUp testMethod tearDown " == test.log)
Beispiel #3
0
 def testFailedResult(self):
     test = xunit.WasRun("testBrokenMethod")
     test.run(self.result)
     assert ("1 run, 1 failed" == self.result.summary())
Beispiel #4
0
 def testResult(self):
     test = xunit.WasRun("testMethod")
     test.run(self.result)
     assert ("1 run, 0 failed" == self.result.summary())
 def testExceptionThrownInSetUp(self):
     test = xunit.WasRun()
Beispiel #6
0
 def testTearDown(self):
     test = xunit.WasRun("testBrokenMethod")
     test.run(self.result)
     assert ("setUp tearDown " == test.log)