def generator():
    try:
        try:
            (yield)
        except:
            [][1]
    except:
        self.assertIsInstance(failure.Failure().value, IndexError)
def generator():
    try:
        try:
            (yield)
        except:
            [][1]
    except:
        self.assertIsInstance(failure.Failure().value, IndexError)