Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Tests/test_imagewin.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def test_dib_paste_bbox(self) -> None:
# Assert
assert dib.size == (128, 128)

with pytest.raises(ValueError, match="images do not match"):
with pytest.raises(ValueError, match="box must match image size"):
dib.paste(im, (0, 0, 1, 1))

def test_dib_frombytes_tobytes_roundtrip(self) -> None:
Expand Down
4 changes: 2 additions & 2 deletions src/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,12 @@ _paste(ImagingDisplayObject *display, PyObject *args) {
if (xy[2] <= xy[0]) {
xy[2] = xy[0] + im->xsize;
} else if (xy[2] - xy[0] != im->xsize) {
return ImagingError_Mismatch();
return ImagingError_Mismatch("box must match image size");
}
if (xy[3] <= xy[1]) {
xy[3] = xy[1] + im->ysize;
} else if (xy[3] - xy[1] != im->ysize) {
return ImagingError_Mismatch();
return ImagingError_Mismatch("box must match image size");
}

ImagingPasteDIB(display->dib, im, xy);
Expand Down
Loading