mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 18:26:17 +03:00
Test invalid WebP background colors
This commit is contained in:
parent
bcded33cee
commit
f64dd53897
|
@ -185,6 +185,17 @@ class TestFileWebp:
|
||||||
Image.open(blob).load()
|
Image.open(blob).load()
|
||||||
Image.open(blob).load()
|
Image.open(blob).load()
|
||||||
|
|
||||||
|
@pytest.mark.parametrize(
|
||||||
|
"background",
|
||||||
|
(0, (0,), (-1, 0, 1, 2), (253, 254, 255, 256)),
|
||||||
|
)
|
||||||
|
@skip_unless_feature("webp_anim")
|
||||||
|
def test_invalid_background(self, background, tmp_path):
|
||||||
|
temp_file = str(tmp_path / "temp.webp")
|
||||||
|
im = hopper()
|
||||||
|
with pytest.raises(OSError):
|
||||||
|
im.save(temp_file, save_all=True, append_images=[im], background=background)
|
||||||
|
|
||||||
@skip_unless_feature("webp_anim")
|
@skip_unless_feature("webp_anim")
|
||||||
def test_background_from_gif(self, tmp_path):
|
def test_background_from_gif(self, tmp_path):
|
||||||
# Save L mode GIF with background
|
# Save L mode GIF with background
|
||||||
|
|
Loading…
Reference in New Issue
Block a user