Skip to content

Commit 850271a

Browse files
authored
Fix warning (#9016)
2 parents 222b862 + a219e96 commit 850271a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Tests/test_file_ppm.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,10 @@ def test_header_token_too_long(tmp_path: Path, data: bytes) -> None:
294294
with open(path, "wb") as f:
295295
f.write(data)
296296

297-
with pytest.raises(ValueError, match="Token too long in file header: "):
297+
with pytest.raises(ValueError) as e:
298298
with Image.open(path):
299299
pass
300+
assert "Token too long in file header: " in repr(e)
300301

301302

302303
def test_truncated_file(tmp_path: Path) -> None:

0 commit comments

Comments
 (0)