Skip to content

Commit dafd559

Browse files
committed
Add structuring operation to test
1 parent fcbe668 commit dafd559

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/test_generics.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,5 +364,7 @@ class GenericEntity(GenericProtocol[int]):
364364
def test_generics_with_stringified_annotations():
365365
"""Type resolution works with stringified annotations."""
366366
converter = Converter()
367-
dct = converter.unstructure(GenericClass(42), unstructure_as=GenericClass[int])
367+
inst = GenericClass(42)
368+
dct = converter.unstructure(inst, unstructure_as=GenericClass[int])
368369
assert dct == {"t": 42}
370+
assert converter.structure(dct, GenericClass[int])

0 commit comments

Comments
 (0)