def test_findFailureInGenerator(self):
    '\n        Within an exception handler, it should be possible to find the\n        original Failure that caused the current exception (if it was\n        caused by throwExceptionIntoGenerator).\n        '
    f = getDivisionFailure()
    f.cleanFailure()
    foundFailures = []

    def generator():
        try:
            (yield)
        except:
            foundFailures.append(failure.Failure._findFailure())
        else:
            self.fail('No exception sent to generator')
    g = generator()
    next(g)
    self._throwIntoGenerator(f, g)
    self.assertEqual(foundFailures, [f])
Within an exception handler, it should be possible to find the
original Failure that caused the current exception (if it was
caused by throwExceptionIntoGenerator).
def test_findFailureInGenerator(self):
    '\n        Within an exception handler, it should be possible to find the\n        original Failure that caused the current exception (if it was\n        caused by throwExceptionIntoGenerator).\n        '
    f = getDivisionFailure()
    f.cleanFailure()
    foundFailures = []

    def generator():
        try:
            (yield)
        except:
            foundFailures.append(failure.Failure._findFailure())
        else:
            self.fail('No exception sent to generator')
    g = generator()
    next(g)
    self._throwIntoGenerator(f, g)
    self.assertEqual(foundFailures, [f])