MCPcopy Create free account
hub / github.com/dask/dask / build

Function build

dask/tests/test_base.py:118–137  ·  view source on GitHub ↗
(a, b, c, iterator)

Source from the content-addressed store, hash-verified

116 c = a + 2
117
118 def build(a, b, c, iterator):
119 t = (
120 a,
121 b, # Top-level collections
122 {
123 "a": a, # dict
124 a: b, # collections as keys
125 "b": [1, 2, [b]], # list
126 "c": 10, # other builtins pass through unchanged
127 "d": (c, 2), # tuple
128 "e": {a, 2, 3}, # set
129 "f": OrderedDict([("a", a)]),
130 "g": ADataClass(a=a), # dataclass instance
131 "h": (ADataClass, a), # dataclass constructor
132 "i": ANamedTuple(a=a), # namedtuple instance
133 }, # OrderedDict
134 iterator,
135 ) # Iterator
136
137 return t
138
139 args = build(a, b, c, (i for i in [a, b, c]))
140

Callers 1

test_unpack_collectionsFunction · 0.85

Calls 2

ADataClassClass · 0.70
ANamedTupleClass · 0.70

Tested by

no test coverage detected