Fix indentation

This commit is contained in:
Marko Tibold 2012-01-04 12:23:12 +01:00
parent 47e4f0d37d
commit 1f6e3429e4

View File

@ -443,21 +443,21 @@ except ImportError: # python < 2.7
# Pasted from py27/lib/unittest/case.py # Pasted from py27/lib/unittest/case.py
pass pass
def skip(reason): def skip(reason):
# Pasted from py27/lib/unittest/case.py # Pasted from py27/lib/unittest/case.py
""" """
Unconditionally skip a test. Unconditionally skip a test.
""" """
def decorator(test_item): def decorator(test_item):
if not (isinstance(test_item, type) and issubclass(test_item, TestCase)): if not (isinstance(test_item, type) and issubclass(test_item, TestCase)):
@functools.wraps(test_item) @functools.wraps(test_item)
def skip_wrapper(*args, **kwargs): def skip_wrapper(*args, **kwargs):
raise SkipTest(reason) raise SkipTest(reason)
test_item = skip_wrapper test_item = skip_wrapper
test_item.__unittest_skip__ = True test_item.__unittest_skip__ = True
test_item.__unittest_skip_why__ = reason test_item.__unittest_skip_why__ = reason
return test_item return test_item
return decorator return decorator
unittest.skip = skip unittest.skip = skip