mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 01:16:16 +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()
|
||||
|
||||
@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")
|
||||
def test_background_from_gif(self, tmp_path):
|
||||
# Save L mode GIF with background
|
||||
|
|
Loading…
Reference in New Issue
Block a user