Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Tests/test_file_ppm.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,10 @@ def test_header_token_too_long(tmp_path: Path, data: bytes) -> None:
with open(path, "wb") as f:
f.write(data)

with pytest.raises(ValueError, match="Token too long in file header: "):
with pytest.raises(ValueError) as e:
with Image.open(path):
pass
assert "Token too long in file header: " in repr(e)


def test_truncated_file(tmp_path: Path) -> None:
Expand Down
Loading