Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions tests/functional/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,12 @@ def valid_formatted_image(
tmp_path_factory: pytest.TempPathFactory,
) -> bytes:
image_format = request.param
if (magick_path := shutil.which("magick")) is None:
# Try 'magick' first (ImageMagick 7.x), fall back to 'convert' (6.x)
if (magick_path := shutil.which("magick")) is None and (
magick_path := shutil.which("convert")
) is None:
Comment on lines +96 to +98

Copilot AI Dec 2, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The convert command is ambiguous as it exists in both ImageMagick and other system utilities. Consider using magick convert for ImageMagick 7.x compatibility or checking for convert from ImageMagick specifically by verifying its version output to ensure the correct tool is being used.

Copilot uses AI. Check for mistakes.
pytest.fail(
"ImageMagick 'magick' command not found - cannot run "
"multi-format test"
"ImageMagick command not found - cannot run multi-format test"
)

image_dir = tmp_path_factory.mktemp("images")
Expand Down