diff --git a/Tests/test_pyarrow.py b/Tests/test_pyarrow.py index 2dfa440d181..c33c5a34ffd 100644 --- a/Tests/test_pyarrow.py +++ b/Tests/test_pyarrow.py @@ -24,7 +24,7 @@ def _test_img_equals_pyarray( - img: Image.Image, arr: Any, mask: list[int] | None, elts_per_pixel: int = 1 + img: Image.Image, arr: Any, mask: list[int] | None = None, elts_per_pixel: int = 1 ) -> None: assert img.height * img.width * elts_per_pixel == len(arr) px = img.load() @@ -237,7 +237,8 @@ def test_fromarray_interleaved_to_array() -> None: arr = pyarrow.array(list(img.tobytes()), type=pyarrow.uint8()) borrowed = Image.fromarrow(arr, "RGBA", img.size) - _test_img_equals_pyarray(img, pyarrow.array(borrowed), None) # type: ignore[call-overload] + arr = pyarrow.array(borrowed) # type: ignore[call-overload] + _test_img_equals_pyarray(img, arr) @pytest.mark.parametrize(