Skip to content

Commit

Permalink
Include units
Browse files Browse the repository at this point in the history
Co-authored-by: Hugo van Kemenade <[email protected]>
  • Loading branch information
radarhere and hugovk authored Aug 24, 2024
1 parent d49ea37 commit 658b60e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Tests/test_file_webp.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def test_write_encoding_error_bad_dimension(self, tmp_path: Path) -> None:
with pytest.raises(ValueError) as e:
im.save(temp_file)
assert (
str(e.value) == "encoding error 5: Image size exceeds WebP limit of 16383"
str(e.value) == "encoding error 5: Image size exceeds WebP limit of 16383 pixels"
)

def test_WebPEncode_with_invalid_args(self) -> None:
Expand Down
2 changes: 1 addition & 1 deletion src/_webp.c
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ WebPEncode_wrapper(PyObject *self, PyObject *args) {
char message[50] = "";
if (error_code == VP8_ENC_ERROR_BAD_DIMENSION) {
sprintf(
message, ": Image size exceeds WebP limit of %d", WEBP_MAX_DIMENSION
message, ": Image size exceeds WebP limit of %d pixels", WEBP_MAX_DIMENSION
);
}
PyErr_Format(PyExc_ValueError, "encoding error %d%s", error_code, message);
Expand Down

0 comments on commit 658b60e

Please sign in to comment.