Skip to content

Commit f5ab7bb

Browse files
authored
Skip test if FreeType is not available (#9540)
2 parents 64f6d4e + 17612be commit f5ab7bb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Tests/test_font_crash.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
from PIL import Image, ImageDraw, ImageFont
44

5+
from .helper import skip_unless_feature
6+
57

68
class TestFontCrash:
79
def _fuzz_font(self, font: ImageFont.FreeTypeFont) -> None:
@@ -14,6 +16,7 @@ def _fuzz_font(self, font: ImageFont.FreeTypeFont) -> None:
1416
draw.multiline_textbbox((10, 10), "ABC\nAaaa", font, stroke_width=2)
1517
draw.text((10, 10), "Test Text", font=font, fill="#000")
1618

19+
@skip_unless_feature("freetype")
1720
def test_segfault(self) -> None:
1821
font = ImageFont.truetype("Tests/fonts/fuzz_font-5203009437302784")
1922
self._fuzz_font(font)

0 commit comments

Comments
 (0)