mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
Skip tests that require FreeType if FreeType is not available
This commit is contained in:
parent
d80610822f
commit
472eb66683
|
@ -6,6 +6,7 @@ import packaging
|
|||
import pytest
|
||||
|
||||
from PIL import Image, features
|
||||
from Tests.helper import skip_unless_feature
|
||||
|
||||
if sys.platform.startswith("win32"):
|
||||
pytest.skip("Fuzzer is linux only", allow_module_level=True)
|
||||
|
@ -48,6 +49,7 @@ def test_fuzz_images(path):
|
|||
fuzzers.disable_decompressionbomb_error()
|
||||
|
||||
|
||||
@skip_unless_feature("freetype2")
|
||||
@pytest.mark.parametrize(
|
||||
"path", subprocess.check_output("find Tests/fonts -type f", shell=True).split(b"\n")
|
||||
)
|
||||
|
|
|
@ -1326,6 +1326,7 @@ def test_stroke_multiline():
|
|||
assert_image_similar_tofile(im, "Tests/images/imagedraw_stroke_multiline.png", 3.3)
|
||||
|
||||
|
||||
@skip_unless_feature("freetype2")
|
||||
def test_setting_default_font():
|
||||
# Arrange
|
||||
im = Image.new("RGB", (100, 250))
|
||||
|
|
|
@ -112,6 +112,7 @@ def helper_assert_pickled_font_images(font1, font2):
|
|||
assert_image_equal(im1, im2)
|
||||
|
||||
|
||||
@skip_unless_feature("freetype2")
|
||||
@pytest.mark.parametrize("protocol", list(range(0, pickle.HIGHEST_PROTOCOL + 1)))
|
||||
def test_pickle_font_string(protocol):
|
||||
# Arrange
|
||||
|
@ -125,6 +126,7 @@ def test_pickle_font_string(protocol):
|
|||
helper_assert_pickled_font_images(font, unpickled_font)
|
||||
|
||||
|
||||
@skip_unless_feature("freetype2")
|
||||
@pytest.mark.parametrize("protocol", list(range(0, pickle.HIGHEST_PROTOCOL + 1)))
|
||||
def test_pickle_font_file(tmp_path, protocol):
|
||||
# Arrange
|
||||
|
|
Loading…
Reference in New Issue
Block a user