From 8bdc96c200f75e827468baff4801a57d7785f913 Mon Sep 17 00:00:00 2001 From: Thibault Derousseaux Date: Tue, 13 Feb 2024 19:40:28 -0500 Subject: [PATCH] fixup! Update to Atoti Python API 0.8.9 --- tests/docker/conftest.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/docker/conftest.py b/tests/docker/conftest.py index fa5c581..6fc33db 100644 --- a/tests/docker/conftest.py +++ b/tests/docker/conftest.py @@ -31,15 +31,18 @@ def poetry_executable_path_fixture() -> str: @pytest.fixture(name="docker_image_name", scope="session") -def docker_image_name_fixture(docker_executable_path: str, project_name: str) -> str: +def docker_image_name_fixture( + docker_executable_path: str, + project_name: str, +) -> Generator[str, None, None]: tag = f"{project_name}:{uuid4()}" build_image_output = run_command( [docker_executable_path, "build", "--tag", tag, "."] ) assert f"naming to docker.io/library/{tag}" in build_image_output - return tag - # remove_image_output = run_command([docker_executable_path, "image", "rm", tag]) - # assert re.match("(Deleted|Untagged)", remove_image_output) + yield tag + remove_image_output = run_command([docker_executable_path, "image", "rm", tag]) + assert re.match("(Deleted|Untagged)", remove_image_output) @pytest.fixture(name="docker_client", scope="session")