diff --git a/Tests/test_file_gif.py b/Tests/test_file_gif.py index abd1822e490..c257e87271b 100644 --- a/Tests/test_file_gif.py +++ b/Tests/test_file_gif.py @@ -14,6 +14,7 @@ assert_image_similar, hopper, is_pypy, + skip_unless_feature, ) TYPE_CHECKING = False @@ -280,7 +281,16 @@ def test_roundtrip2(tmp_path: Path) -> None: assert_image_similar(reread.convert("RGB"), hopper(), 12) -@pytest.mark.parametrize("mode", ("CMYK", "HSV", "LAB", "RGBX", "YCbCr")) +@pytest.mark.parametrize( + "mode", + ( + "CMYK", + "HSV", + "RGBX", + "YCbCr", + pytest.param("LAB", marks=skip_unless_feature("littlecms2")), + ), +) def test_roundtrip_other_rgb_modes(tmp_path: Path, mode: str) -> None: out = tmp_path / "temp.gif" im = hopper(mode) diff --git a/Tests/test_imagetext.py b/Tests/test_imagetext.py index babfeba6b76..66c6c75f191 100644 --- a/Tests/test_imagetext.py +++ b/Tests/test_imagetext.py @@ -208,6 +208,7 @@ def test_wrap_height() -> None: assert text.text == "Text does\nnot fit" +@skip_unless_feature("freetype2") def test_wrap_height_blank_line(layout_engine: ImageFont.Layout) -> None: font = ImageFont.truetype(FONT_PATH, 10, layout_engine=layout_engine) text = ImageText.Text("A\n\nB", font)