From 17612be407cc6c28f9657ac34980b664535f2a73 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sun, 5 Apr 2026 12:57:01 +1000 Subject: [PATCH] Skip test if FreeType is not available --- Tests/test_font_crash.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Tests/test_font_crash.py b/Tests/test_font_crash.py index 72a0f353477..d1e1b7f665f 100644 --- a/Tests/test_font_crash.py +++ b/Tests/test_font_crash.py @@ -2,6 +2,8 @@ from PIL import Image, ImageDraw, ImageFont +from .helper import skip_unless_feature + class TestFontCrash: def _fuzz_font(self, font: ImageFont.FreeTypeFont) -> None: @@ -14,6 +16,7 @@ def _fuzz_font(self, font: ImageFont.FreeTypeFont) -> None: draw.multiline_textbbox((10, 10), "ABC\nAaaa", font, stroke_width=2) draw.text((10, 10), "Test Text", font=font, fill="#000") + @skip_unless_feature("freetype") def test_segfault(self) -> None: font = ImageFont.truetype("Tests/fonts/fuzz_font-5203009437302784") self._fuzz_font(font)