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

Method test_nested_lists

tests/test_funcs.py:85–92  ·  view source on GitHub ↗

Test unstructuring deeply nested lists.

(self, C)

Source from the content-addressed store, hash-verified

83 assert type(asdict(c)["y"][0]) is Int
84
85 def test_nested_lists(self, C):
86 """
87 Test unstructuring deeply nested lists.
88 """
89 inner = C(1, 2)
90 outer = C([[inner]], None)
91
92 assert {"x": [[{"x": 1, "y": 2}]], "y": None} == asdict(outer)
93
94 def test_nested_dicts(self, C):
95 """

Callers

nothing calls this directly

Calls 2

asdictFunction · 0.90
CClass · 0.70

Tested by

no test coverage detected