def require_docker_version(minimum_docker_version, message):
 minimum_docker_version = LooseVersion(minimum_docker_version)
 def decorator(wrapped):
  @wraps(wrapped)
  def wrapper(*args, **kwargs):
   client = DockerClient()
   docker_version = LooseVersion(client._client.version()['Version'])
   if (docker_version < minimum_docker_version):
    raise SkipTest('Minimum required Docker version: {}. Actual Docker version: {}. Details: {}'.format(minimum_docker_version, docker_version, message))
   return wrapped(*args, **kwargs)
  return wrapper
 return decorator

def require_docker_version ( minimum_docker_version , message ) : minimum_docker_version = LooseVersion ( minimum_docker_version ) def decorator ( wrapped ) : @ wraps ( wrapped ) def wrapper ( * args , ** kwargs ) : client = DockerClient ( ) docker_version = LooseVersion ( client . _client . version ( ) [ 'Version' ] ) if ( docker_version < minimum_docker_version ) : raise SkipTest ( 'Minimum required Docker version: {}. Actual Docker version: {}. Details: {}' . format ( minimum_docker_version , docker_version , message ) ) return wrapped ( * args , ** kwargs ) return wrapper return decorator
skip the wrapped test if the actual docker version is less than minimum_docker_version .