From 36a536ca1a8a5aca027379d59e71cf0542fc0c52 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Thu, 3 Apr 2025 18:21:31 +1100 Subject: [PATCH] Assert colors is not None --- Tests/test_file_avif.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Tests/test_file_avif.py b/Tests/test_file_avif.py index 069a48940..036e9a8cb 100644 --- a/Tests/test_file_avif.py +++ b/Tests/test_file_avif.py @@ -256,7 +256,9 @@ class TestFileAvif: assert_image(im, "RGBA", (64, 64)) # image has 876 transparent pixels - assert im.getchannel("A").getcolors()[0] == (876, 0) + colors = im.getchannel("A").getcolors() + assert colors is not None + assert colors[0] == (876, 0) def test_save_transparent(self, tmp_path: Path) -> None: im = Image.new("RGBA", (10, 10), (0, 0, 0, 0))