Skip to content

Commit

Permalink
Use consistent image names
Browse files Browse the repository at this point in the history
  • Loading branch information
achimnol committed Jun 25, 2024
1 parent 5d31afb commit 5deb9b2
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,17 @@ def image_name() -> str:
async def testing_images(image_name: str) -> None:
# Prepare a small Linux image shared by most test cases.
docker = Docker()
required_images = [image_name]
if image_name != "python:latest":
required_images.append("python:latest")
for img in required_images:
try:
await docker.images.inspect(img)
except DockerError as e:
assert e.status == 404
print(f'Pulling "{img}" for the testing session...')
await docker.pull(img)
await docker.close()
try:
required_images = [image_name]
for img in required_images:
try:
await docker.images.inspect(img)
except DockerError as e:
assert e.status == 404
print(f'Pulling "{img}" for the testing session...')
await docker.pull(img)
finally:
await docker.close()


@pytest.fixture
Expand Down

0 comments on commit 5deb9b2

Please sign in to comment.