def test_result(self): test = WasRun("testMethod") result = test.run() assert "1 run, 0 failed" == result.summary()
def test_suite(self): suite = TestSuite() suite.add(WasRun("testMethod")) suite.add(WasRun("brokenMethod")) result = suite.run() assert result.summary() == "2 run, 1 failed"
def test_run(self): test = WasRun("testMethod") test.run() assert test.log == "setUp testMethod tearDown "
def test_failed_result(self): # expected failure test = WasRun('broken_method') test.run(self.result) assert "1 run, 1 failed" == self.result.summary(), "Expected Failure"
def test_failed(self): test = WasRun("brokenMethod") result = test.run() assert "1 run, 1 failed" == result.summary()
def test_template_method(self): test = WasRun('test_method') test.run(self.result) assert "setUp test_method tearDown " == test.log
def test_result(self): test = WasRun('test_method') test.run(self.result) assert "1 run, 0 failed" == self.result.summary()
def testSuite(self): suite = TestSuite() suite.add(WasRun('testMethod')) suite.add(WasRun('testBrokenMethod')) suite.run(self.result) assert('2 run, 1 failed' == self.result.summary())
def testFailedResult(self): test = WasRun('testBrokenMethod') test.run(self.result) assert('1 run, 1 failed', self.result.summary)
def testFailedResultAlwaysTeardown(self): test = WasRun('testBrokenMethod') test.run(self.result) assert('tearDown' in test.log)
def testResult(self): test = WasRun('testMethod') test.run(self.result) assert('1 run, 0 failed' == self.result.summary())
def testTemplateMethod(self): test = WasRun('testMethod') test.run(self.result) assert('setup testMethod tearDown ' == test.log)