MCPcopy Index your code
hub / github.com/plotly/dash / test_map_grouping_mixed

Function test_map_grouping_mixed

tests/unit/library/test_grouping.py:157–167  ·  view source on GitHub ↗
(mixed_grouping_size)

Source from the content-addressed store, hash-verified

155
156
157def test_map_grouping_mixed(mixed_grouping_size):
158 grouping, size = mixed_grouping_size
159
160 def fn(x):
161 return x * 2 + 5
162
163 result = map_grouping(fn, grouping)
164 expected = make_grouping_by_index(
165 grouping, list(map(fn, flatten_grouping(grouping)))
166 )
167 assert expected == result
168
169
170# Test make_grouping_by_key

Callers

nothing calls this directly

Calls 3

map_groupingFunction · 0.90
make_grouping_by_indexFunction · 0.90
flatten_groupingFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…