def METHOD_NAME(self):
    def f(frame, event, arg):
        if event == 'exception':
                global ex
                ex = arg
        return f
    sys.settrace(f)
    def g():
        raise Exception()
    try:
        g()
    except:
        pass
    exc_type = ex[0]
    exc_value = ex[1]
    tb_value = ex[2]
    import traceback
    self.assertTrue(''.join(traceback.format_exception(exc_type, exc_value, tb_value)).find('line') != -1)
    sys.settrace(None)