예제 #1
0
def skip_if_microversion_not_supported(microversion):
    """Decorator for tests that are microversion-specific."""
    if not is_microversion_supported(microversion):
        reason = ("Skipped. Test requires microversion %s that is not "
                  "allowed to be used by configuration." % microversion)
        return testtools.skip(reason)
    return lambda f: f
def skip_if_microversion_not_supported(microversion):
    """Decorator for tests that are microversion-specific."""
    if not is_microversion_supported(microversion):
        reason = ("Skipped. Test requires microversion %s that is not "
                  "allowed to be used by configuration." % microversion)
        return testtools.skip(reason)
    return lambda f: f
예제 #3
0
파일: utils.py 프로젝트: vkmc/manila
def skip_if_microversion_lt(microversion):
    """Decorator for tests that are microversion-specific."""
    if is_microversion_lt(CONF.share.max_api_microversion, microversion):
        reason = ("Skipped. Test requires microversion greater than or "
                  "equal to '%s'." % microversion)
        return testtools.skip(reason)
    return lambda f: f
예제 #4
0
파일: utils.py 프로젝트: NetApp/manila
def skip_if_microversion_lt(microversion):
    """Decorator for tests that are microversion-specific."""
    if is_microversion_lt(CONF.share.max_api_microversion, microversion):
        reason = ("Skipped. Test requires microversion greater than or "
                  "equal to '%s'." % microversion)
        return testtools.skip(reason)
    return lambda f: f
예제 #5
0
def skip_if_is_microversion_ge(left, right):
    """Skip if version for left is greater than or equal to the right one."""

    if is_microversion_ge(left, right):
        reason = ("Skipped. Test requires microversion "
                  "< than '%s'." % right)
        return testtools.skip(reason)
    return lambda f: f
예제 #6
0
def skip_if_microversion_not_supported(microversion):
    """Decorator for tests that are microversion-specific."""
    if not is_microversion_supported(microversion):
        reason = ("Skipped. Test requires microversion '%s'." % microversion)
        return testtools.skip(reason)
    return lambda f: f
예제 #7
0
파일: utils.py 프로젝트: vkmc/manila
def skip_if_microversion_not_supported(microversion):
    """Decorator for tests that are microversion-specific."""
    if not is_microversion_supported(microversion):
        reason = ("Skipped. Test requires microversion '%s'." % microversion)
        return testtools.skip(reason)
    return lambda f: f
예제 #8
0
 def given(thing):
     return skip("Hypothesis not importable")
예제 #9
0
 def given(thing):
     return skip("Hypothesis not importable")