Here are the examples of the python api twisted.trial.runner.ErrorHolder taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
3 Examples
3
Example 1
def setUp(self):
self.description = "description"
# make a real Failure so we can construct ErrorHolder()
try:
1/0
except ZeroDivisionError:
error = failure.Failure()
self.holder = runner.ErrorHolder(self.description, error)
3
Example 2
def setUp(self):
self.description = "description"
# make a real Failure so we can construct ErrorHolder()
try:
raise self.exceptionForTests
except ZeroDivisionError:
self.error = failure.Failure()
self.holder = runner.ErrorHolder(self.description, self.error)
self.result = self.TestResultStub()
3
Example 3
def setUp(self):
self.description = "description"
# make a real Failure so we can construct ErrorHolder()
try:
raise self.exceptionForTests
except ZeroDivisionError:
exceptionInfo = sys.exc_info()
self.error = failure.Failure()
self.holder = runner.ErrorHolder(self.description, exceptionInfo)
self.result = self.TestResultStub()