twisted.trial.runner.ErrorHolder

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 7

Example 1

Project: mythbox Source File: test_runner.py
Function: set_up
    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)

Example 2

Project: SubliminalCollaborator Source File: test_runner.py
Function: set_up
    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()

Example 3

Project: SubliminalCollaborator Source File: test_runner.py
Function: set_up
    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()