Update tests to change for ValueError when encoding an empty image
This commit is contained in:
parent
8004234d87
commit
dd042da9c2
@ -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")
|
||||
|
||||
|
||||
|
||||
@ -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")
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user