From: Clint Byrum Date: Sun, 28 Apr 2013 16:48:43 +0000 (-0700) Subject: Remove unused skip_unless and skip_test decorators X-Git-Tag: 2014.1~670 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=5232aeba7bd156c8a438751acc3da900e9b2ca4a;p=openstack-build%2Fheat-build.git Remove unused skip_unless and skip_test decorators Change-Id: I1519fc4b3b827ef35352968b67759b0b5d3fd5f2 --- diff --git a/heat/tests/utils.py b/heat/tests/utils.py index d9da8f3f..19bd94f2 100644 --- a/heat/tests/utils.py +++ b/heat/tests/utils.py @@ -18,20 +18,6 @@ from heat.db.sqlalchemy.session import get_engine from heat.db import migration -class skip_test(object): - """Decorator that skips a test.""" - def __init__(self, msg): - self.message = msg - - def __call__(self, func): - def _skipper(*args, **kw): - """Wrapped skipper function.""" - raise skip.SkipTest(self.message) - _skipper.__name__ = func.__name__ - _skipper.__doc__ = func.__doc__ - return _skipper - - class skip_if(object): """Decorator that skips a test if condition is true.""" def __init__(self, condition, msg): @@ -49,23 +35,6 @@ class skip_if(object): return _skipper -class skip_unless(object): - """Decorator that skips a test if condition is not true.""" - def __init__(self, condition, msg): - self.condition = condition - self.message = msg - - def __call__(self, func): - def _skipper(*args, **kw): - """Wrapped skipper function.""" - if not self.condition: - raise skip.SkipTest(self.message) - func(*args, **kw) - _skipper.__name__ = func.__name__ - _skipper.__doc__ = func.__doc__ - return _skipper - - def stack_delete_after(test_fn): """ Decorator which calls test class self.stack.delete()