Skip to content

Commit

Permalink
Use cattrs; from_dict disappeared with the removal of dacite
Browse files Browse the repository at this point in the history
  • Loading branch information
justvanrossum committed Nov 17, 2023
1 parent 6a51bfd commit e1b26bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_font.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from dataclasses import asdict
from importlib.metadata import entry_points

import cattrs
import pytest
from fontra.core.classes import (
GlobalAxis,
Expand All @@ -13,7 +14,6 @@
Source,
StaticGlyph,
VariableGlyph,
from_dict,
)

from fontra_rcjk.base import makeSafeLayerName
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit e1b26bd

Please sign in to comment.