def skip(reason):
    """The skip decorator allows for you to always bypass a test.

    :param reason: Expects a string
    """
    def decorator(test_func):
        if not isinstance(test_func, (type, ClassObjType)):
            func_data = None
            if test_func.__name__ == 'DECORATOR_ONCALL':
                # Call down and save the results
                func_data = test_func()

            @functools.wraps(test_func)
            def skip_wrapper(*args, **kwargs):
                other_data = {
                    'real_func': func_data[0] if func_data else test_func,
                    'metadata': func_data[1] if func_data else None
                }
                raise TestSkippedException(test_func, reason, other_data)
            test_func = skip_wrapper
        return test_func
    return decorator
def skip ( reason ) : def decorator ( test_func ) : if not isinstance ( test_func , ( type , ClassObjType ) ) : func_data = None if test_func . __name__ == 'DECORATOR_ONCALL' : func_data = test_func ( ) @ functools . wraps ( test_func ) def skip_wrapper ( * args , ** kwargs ) : other_data = { 'real_func' : func_data [ 0 ] if func_data else test_func , 'metadata' : func_data [ 1 ] if func_data else None } raise TestSkippedException ( test_func , reason , other_data ) test_func = skip_wrapper return test_func return decorator
The skip decorator allows for you to always bypass a test.

    :param reason: Expects a string