Skip to content

Commit

Permalink
Update test_font_collection.py
Browse files Browse the repository at this point in the history
  • Loading branch information
moi15moi committed Nov 19, 2024
1 parent 1d92386 commit 2f02566
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/font/test_font_collection.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
from platform import system
import pytest
import shutil
from font_collector import (
Expand Down Expand Up @@ -222,3 +223,14 @@ def test__repr__():
)

assert repr(font_collection) == 'FontCollection(Use system font="False", Reload system font="False", Use generated fonts="False", Additional fonts="set()")'


@pytest.mark.skipif(system() != "Darwin", reason="Test runs only on Darwin")
def test_BM_Kirang_Haerang():
font_collection = FontCollection(use_system_font=True)
strategy = FontSelectionStrategyLibass()

ass_style = AssStyle("BM Kirang Haerang", 400, False)
font_result = font_collection.get_used_font_by_style(ass_style, strategy)
assert font_result != None
assert font_result.font_face.font_file.filename.is_file()

0 comments on commit 2f02566

Please sign in to comment.