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

Method test_shallow

tests/test_funcs.py:52–58  ·  view source on GitHub ↗

Shallow asdict returns correct dict.

(self, C, dict_factory)

Source from the content-addressed store, hash-verified

50
51 @given(st.sampled_from(MAPPING_TYPES))
52 def test_shallow(self, C, dict_factory):
53 """
54 Shallow asdict returns correct dict.
55 """
56 assert {"x": 1, "y": 2} == asdict(
57 C(x=1, y=2), False, dict_factory=dict_factory
58 )
59
60 @given(st.sampled_from(MAPPING_TYPES))
61 def test_recurse(self, C, dict_class):

Callers

nothing calls this directly

Calls 2

asdictFunction · 0.90
CClass · 0.70

Tested by

no test coverage detected