def skip(reason):
def decorator(test_item):<EOL><INDENT>if not (isinstance(test_item, type) and issubclass(test_item, TestCase)):<EOL><INDENT>@wraps(test_item)<EOL>def skip_wrapper(*args, **kwargs):<EOL><INDENT>raise SkipTest(reason)<EOL><DEDENT>test_item = skip_wrapper<EOL><DEDENT>test_item.__unittest_skip__ = True<EOL>test_item.__unittest_skip_why__ = reason<EOL>return test_item<EOL><DEDENT>return decorator<EOL>
Unconditionally skip a test.