MCPcopy
hub / github.com/python-attrs/attrs / test_recurse

Method test_recurse

tests/test_funcs.py:61–67  ·  view source on GitHub ↗

Deep asdict returns correct dict.

(self, C, dict_class)

Source from the content-addressed store, hash-verified

59
60 @given(st.sampled_from(MAPPING_TYPES))
61 def test_recurse(self, C, dict_class):
62 """
63 Deep asdict returns correct dict.
64 """
65 assert {"x": {"x": 1, "y": 2}, "y": {"x": 3, "y": 4}} == asdict(
66 C(C(1, 2), C(3, 4)), dict_factory=dict_class
67 )
68
69 def test_non_atomic_types(self, C):
70 """

Callers

nothing calls this directly

Calls 2

asdictFunction · 0.90
CClass · 0.70

Tested by

no test coverage detected