3232from cattrs .gen import make_dict_structure_fn , override
3333
3434from ._compat import is_py310_plus
35+ from .asserts import assert_only_unstructured
3536from .typed import (
3637 nested_typed_classes ,
3738 simple_typed_attrs ,
@@ -54,7 +55,7 @@ def test_simple_roundtrip(cls_and_vals, detailed_validation):
5455 cl , vals , kwargs = cls_and_vals
5556 inst = cl (* vals , ** kwargs )
5657 unstructured = converter .unstructure (inst )
57- assert "Hyp" not in repr (unstructured )
58+ assert_only_unstructured (unstructured )
5859 assert inst == converter .structure (unstructured , cl )
5960
6061
@@ -73,7 +74,7 @@ def test_simple_roundtrip_tuple(cls_and_vals, dv: bool):
7374 cl , vals , _ = cls_and_vals
7475 inst = cl (* vals )
7576 unstructured = converter .unstructure (inst )
76- assert "Hyp" not in repr (unstructured )
77+ assert_only_unstructured (unstructured )
7778 assert inst == converter .structure (unstructured , cl )
7879
7980
@@ -125,7 +126,7 @@ def test_simple_roundtrip_with_extra_keys_forbidden(cls_and_vals, strat):
125126 assume (strat is UnstructureStrategy .AS_DICT or not kwargs )
126127 inst = cl (* vals , ** kwargs )
127128 unstructured = converter .unstructure (inst )
128- assert "Hyp" not in repr (unstructured )
129+ assert_only_unstructured (unstructured )
129130 assert inst == converter .structure (unstructured , cl )
130131
131132
0 commit comments