Ejemplo n.º 1
0
def requires_no_pygments_exceptions(fn):
    def go(*arg, **kw):
        from mako import exceptions
        exceptions._install_fallback()
        try:
            return fn(*arg, **kw)
        finally:
            exceptions._install_highlighting()
    return update_wrapper(go, fn)
Ejemplo n.º 2
0
def requires_no_pygments_exceptions(fn):
    def go(*arg, **kw):
        from mako import exceptions
        exceptions._install_fallback()
        try:
            return fn(*arg, **kw)
        finally:
            exceptions._install_highlighting()
    return update_wrapper(go, fn)
Ejemplo n.º 3
0
 def decorate(fn):
     fn_name = fn.__name__
     def maybe(*args, **kw):
         if predicate():
             msg = "'%s' skipped: %s" % (
                 fn_name, reason)
             raise SkipTest(msg)
         else:
             return fn(*args, **kw)
     return update_wrapper(maybe, fn)
Ejemplo n.º 4
0
 def decorate(fn):
     fn_name = fn.__name__
     def maybe(*args, **kw):
         if predicate():
             msg = "'%s' skipped: %s" % (
                 fn_name, reason)
             raise SkipTest(msg)
         else:
             return fn(*args, **kw)
     return update_wrapper(maybe, fn)