[tests] fix some tests

This commit is contained in:
jan 2026-03-08 10:15:09 -07:00
commit d0b48e6bfc
2 changed files with 9 additions and 3 deletions

View file

@ -10,6 +10,7 @@ from ..error import PatternError
# 1. Text shape tests
def test_text_to_polygons() -> None:
pytest.importorskip("freetype")
font_path = "/usr/share/fonts/truetype/dejavu/DejaVuMathTeXGyre.ttf"
if not Path(font_path).exists():
pytest.skip("Font file not found")
@ -28,6 +29,8 @@ def test_text_to_polygons() -> None:
# 2. Manhattanization tests
def test_manhattanize() -> None:
pytest.importorskip("float_raster")
pytest.importorskip("skimage.measure")
# Diamond shape
poly = Polygon([[0, 5], [5, 10], [10, 5], [5, 0]])
grid = numpy.arange(0, 11, 1)