mirror of
https://github.com/python-pillow/Pillow.git
synced 2026-01-10 18:51:26 +03:00
Assert palette is not None
This commit is contained in:
parent
b71109d435
commit
5b677ca1c6
|
|
@ -71,10 +71,12 @@ def test_sanity() -> None:
|
|||
def test_new_color() -> None:
|
||||
with Image.open("Tests/images/chi.gif") as im:
|
||||
draw = ImageDraw.Draw(im)
|
||||
assert im.palette is not None
|
||||
assert len(im.palette.colors) == 249
|
||||
|
||||
# Test drawing a new color onto the palette
|
||||
draw.line((0, 0), fill=(0, 0, 0))
|
||||
assert im.palette is not None
|
||||
assert len(im.palette.colors) == 250
|
||||
assert im.palette.dirty
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user