Update tests to change for ValueError when encoding an empty image

This commit is contained in:
Andrew Murray 2026-03-13 06:32:15 +11:00
parent 8004234d87
commit dd042da9c2
2 changed files with 2 additions and 2 deletions

View File

@ -314,7 +314,7 @@ def test_roundtrip_save_all_1(tmp_path: Path) -> None:
def test_save_zero(size: tuple[int, int]) -> None:
b = BytesIO()
im = Image.new("RGB", size)
with pytest.raises(SystemError):
with pytest.raises(ValueError, match="cannot write empty image"):
im.save(b, "GIF")

View File

@ -72,7 +72,7 @@ def test_save(tmp_path: Path) -> None:
def test_save_zero(size: tuple[int, int]) -> None:
b = BytesIO()
im = Image.new("1", size)
with pytest.raises(SystemError):
with pytest.raises(ValueError, match="cannot write empty image"):
im.save(b, "SPIDER")