Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion Tests/test_fontfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,20 @@

import pytest

from PIL import FontFile
from PIL import FontFile, Image


def test_compile() -> None:
font = FontFile.FontFile()
font.glyph[0] = ((0, 0), (0, 0, 0, 0), (0, 0, 0, 1), Image.new("L", (0, 0)))
font.compile()
assert font.ysize == 1

font.ysize = 2
font.compile()

# Assert that compiling again did not change anything
assert font.ysize == 2


def test_save(tmp_path: Path) -> None:
Expand Down
Loading