tempest/test.py
def skip_because(*args, **kwargs):
    """A decorator useful to skip tests hitting known bugs

    @param bug: bug number causing the test to skip
    @param condition: optional condition to be True for the skip to have place
    @param interface: skip the test if it is the same as self._interface
    """
    def decorator(f):
        @functools.wraps(f)
        def wrapper(self, *func_args, **func_kwargs):
            skip = False
            if "condition" in kwargs:
                if kwargs["condition"] is True:
                    skip = True
            elif "interface" in kwargs:
                if kwargs["interface"] == self._interface:
                    skip = True
            else:
                skip = True
            if "bug" in kwargs and skip is True:
                msg = "Skipped until Bug: %s is resolved." % kwargs["bug"]
                raise testtools.TestCase.skipException(msg)
            return f(self, *func_args, **func_kwargs)
        return wrapper
    return decorator
A decorator useful to skip tests hitting known bugs

    @param bug: bug number causing the test to skip
    @param condition: optional condition to be True for the skip to have place
    @param interface: skip the test if it is the same as self._interface
    
A decorator useful to skip tests hitting known bugs
A decorator useful to skip tests hitting known bugs
def skip_because(*args, **kwargs):
    def decorator(f):
        @functools.wraps(f)
        def wrapper(self, *func_args, **func_kwargs):
            skip = False
            if "condition" in kwargs:
                if kwargs["condition"] is True:
                    skip = True
            elif "interface" in kwargs:
                if kwargs["interface"] == self._interface:
                    skip = True
            else:
                skip = True
            if "bug" in kwargs and skip is True:
                msg = "Skipped until Bug: %s is resolved." % kwargs["bug"]
                raise testtools.TestCase.skipException(msg)
            return f(self, *func_args, **func_kwargs)
        return wrapper
    return decorator
def skip_because ( * args , ** kwargs ) : def decorator ( f ) : @ functools . wraps ( f ) def wrapper ( self , * func_args , ** func_kwargs ) : skip = False if "condition" in kwargs : if kwargs [ "condition" ] is True : skip = True elif "interface" in kwargs : if kwargs [ "interface" ] == self . _interface : skip = True else : skip = True if "bug" in kwargs and skip is True : msg = "Skipped until Bug: %s is resolved." % kwargs [ "bug" ] raise testtools . TestCase . skipException ( msg ) return f ( self , * func_args , ** func_kwargs ) return wrapper return decorator
A decorator useful to skip tests hitting known bugs
A decorator useful to skip tests hitting known bugs
"""A decorator useful to skip tests hitting known bugs

    @param bug: bug number causing the test to skip
    @param condition: optional condition to be True for the skip to have place
    @param interface: skip the test if it is the same as self._interface
    """
bug
bug number causing the test to skip
bug number causing the test to skip
condition
optional condition to be True for the skip to have place
optional condition to be True for the skip to have place
interface
skip the test if it is the same as self._interface
skip the test if it is the same as self . _interface