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

Method test_lists_tuples

tests/test_funcs.py:148–155  ·  view source on GitHub ↗

If recurse is True, also recurse into lists.

(self, container, C)

Source from the content-addressed store, hash-verified

146
147 @given(container=st.sampled_from(SEQUENCE_TYPES))
148 def test_lists_tuples(self, container, C):
149 """
150 If recurse is True, also recurse into lists.
151 """
152 assert {
153 "x": 1,
154 "y": [{"x": 2, "y": 3}, {"x": 4, "y": 5}, "a"],
155 } == asdict(C(1, container([C(2, 3), C(4, 5), "a"])))
156
157 @given(container=st.sampled_from(SEQUENCE_TYPES))
158 def test_lists_tuples_retain_type(self, container, C):

Callers

nothing calls this directly

Calls 2

asdictFunction · 0.90
CClass · 0.70

Tested by

no test coverage detected