Skip to content

Commit 89c3825

Browse files
committed
Assert getcolors() does not return None
1 parent a3da70e commit 89c3825

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Tests/test_file_avif.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,9 @@ def test_load_transparent_rgb(self) -> None:
254254
assert_image(im, "RGBA", (64, 64))
255255

256256
# image has 876 transparent pixels
257-
assert im.getchannel("A").getcolors()[0] == (876, 0)
257+
colors = im.getchannel("A").getcolors()
258+
assert colors is not None
259+
assert colors[0] == (876, 0)
258260

259261
def test_save_transparent(self, tmp_path: Path) -> None:
260262
im = Image.new("RGBA", (10, 10), (0, 0, 0, 0))

0 commit comments

Comments
 (0)