def docker_client(request): """ This is a text fixture for the docker client, should it be needed in a test """ client = docker.from_env() yield client client.close()
def close(self): from dask.distributed import Client, default_client, as_completed try: client = default_client() client.close() except ValueError: pass if self._cluster: self._cluster.close()