Skip to content

Commit

Permalink
Test unsupported image mode
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Sep 21, 2024
1 parent 83c7043 commit 75cb1c1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Tests/test_file_webp.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ def test_save_all(self, tmp_path: Path) -> None:
reloaded.seek(1)
assert_image_similar(im2, reloaded, 1)

def test_unsupported_image_mode(self) -> None:
im = Image.new("1", (1, 1))
with pytest.raises(ValueError):
_webp.WebPEncode(im.getim(), False, 0, 0, "", 4, 0, b"", "")

def test_icc_profile(self, tmp_path: Path) -> None:
self._roundtrip(tmp_path, self.rgb_mode, 12.5, {"icc_profile": None})
self._roundtrip(
Expand Down

0 comments on commit 75cb1c1

Please sign in to comment.