def testSuite(self): suite = TestSuite() suite.add(WasRun("testMethod")) suite.add(WasRun("testBrokenMethod")) suite.run(self.result) assert ("2 run, 1 failed" == result.summary())
def testRunning(self): test = WasRun("testMethod") assert (not test.wasRun) test.run() assert (test.wasRun)
class TestCaseTest(TestCase): def setUp(self): self.test = WasRun("testMethod") def testRunning(self): self.test.run() assert (self.test.wasRun) def testSetUp(self): self.test.run() assert (self.test.wasSetUp)
def testTemplateMethod(self): test = WasRun("testMethod") test.run() assert("setUp testMethod tearDown" == self.test.log)
def setUp(self): self.test = WasRun("testMethod")
def testFailedResultWithTearDown(self): test = WasRun('testBrokenMethod') result = test.run(self.result) self.assertEquals(result.summary(), '1 run, 1 failed') self.assertEquals('setUp testBrokenMethod tearDown ', test.log)
def testFailedResult(self): test = WasRun('testBrokenMethod') result = test.run(self.result) self.assertEquals(result.summary(), '1 run, 1 failed')
def testResult(self): test = WasRun('testMethod') result = test.run(self.result) self.assertEquals(result.summary(), '1 run, 0 failed')
def testTemplateMethod(self): test = WasRun('testMethod') test.run(self.result) self.assertTrue(test.wasRun) self.assertEquals('setUp testMethod tearDown ', test.log)
def testFailedResult(self): test = WasRun("testBrokenMethod") result = test.run() assert ("1 run, 1 failed" == result.summary())
def testResult(self): test = WasRun("testMethod") result = test.run() assert ("1 run, 0 failed" == result.summary())
def test_running(self): test = WasRun('test_method') assert (not test.was_run) test.run() assert (test.was_run)