mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-03-24 20:14:13 +03:00
make mypy happy
This commit is contained in:
parent
bafb968872
commit
cca80e2a23
|
@ -25,7 +25,9 @@ def _test_img_equals_pyarray(img: Image.Image, arr: Any, mask) -> None:
|
||||||
for y in range(0, img.size[1], int(img.size[1] / 10)):
|
for y in range(0, img.size[1], int(img.size[1] / 10)):
|
||||||
if mask:
|
if mask:
|
||||||
for ix, elt in enumerate(mask):
|
for ix, elt in enumerate(mask):
|
||||||
assert px[x, y][ix] == arr[y * img.width + x].as_py()[elt]
|
pixel = px[x, y]
|
||||||
|
assert isinstance(pixel, tuple)
|
||||||
|
assert pixel[ix] == arr[y * img.width + x].as_py()[elt]
|
||||||
else:
|
else:
|
||||||
assert_deep_equal(px[x, y], arr[y * img.width + x].as_py())
|
assert_deep_equal(px[x, y], arr[y * img.width + x].as_py())
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user