def skip(reason):
    def decorator(test_item):
        if not (isinstance(test_item, type) and issubclass(test_item, TestCase)):
            @wraps(test_item)
            def skip_wrapper(*args, **kwargs):
                raise SkipTest(reason)
            test_item = skip_wrapper

        test_item.__unittest_skip__ = True
        test_item.__unittest_skip_why__ = reason
        return test_item
    return decorator
Unconditionally skip a test.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.3/django/utils/unittest/case.py/skip