diff --git a/tests/test_font.py b/tests/test_font.py index 3d06cc3..02232a9 100644 --- a/tests/test_font.py +++ b/tests/test_font.py @@ -4,6 +4,7 @@ from dataclasses import asdict from importlib.metadata import entry_points +import cattrs import pytest from fontra.core.classes import ( GlobalAxis, @@ -13,7 +14,6 @@ Source, StaticGlyph, VariableGlyph, - from_dict, ) from fontra_rcjk.base import makeSafeLayerName @@ -396,7 +396,7 @@ async def test_getGlyphMap(backendName, numGlyphs, testMapping): @pytest.mark.asyncio @pytest.mark.parametrize("backendName, expectedGlyph", getGlyphTestData) async def test_getGlyph(backendName, expectedGlyph): - expectedGlyph = from_dict(VariableGlyph, expectedGlyph) + expectedGlyph = cattrs.structure(expectedGlyph, VariableGlyph) font = getTestFont(backendName) with contextlib.closing(font): glyph = await font.getGlyph(expectedGlyph.name)