Skip to content

Commit c0e741d

Browse files
feat: Handle ImageMagick 6 and 7 command names in tests
1 parent 347c3f9 commit c0e741d

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

tests/functional/conftest.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,12 @@ def valid_formatted_image(
9292
tmp_path_factory: pytest.TempPathFactory,
9393
) -> bytes:
9494
image_format = request.param
95+
# Try 'magick' first (ImageMagick 7.x), fall back to 'convert' (ImageMagick 6.x)
9596
if (magick_path := shutil.which("magick")) is None:
96-
pytest.fail(
97-
"ImageMagick 'magick' command not found - cannot run "
98-
"multi-format test"
99-
)
97+
if (magick_path := shutil.which("convert")) is None:
98+
pytest.fail(
99+
"ImageMagick command not found - cannot run multi-format test"
100+
)
100101

101102
image_dir = tmp_path_factory.mktemp("images")
102103

0 commit comments

Comments
 (0)