def generator():
    try:
        (yield)
    except:
        stuff.append(sys.exc_info())
    else:
        self.fail('Yield should have yielded exception.')
def generator():
    try:
        (yield)
    except:
        stuff.append(sys.exc_info())
    else:
        self.fail('Yield should have yielded exception.')