MCPcopy Create free account
hub / github.com/cdgriffith/Box / merged

Method merged

test/test_edge_cases.py:522–525  ·  view source on GitHub ↗
(strategy)

Source from the content-addressed store, hash-verified

520class TestMergeUpdate:
521 def test_list_strategies(self):
522 def merged(strategy):
523 bx = Box({"l": [1, 2], "d": [{"a": 1}]})
524 bx.merge_update({"l": [2, 3], "d": [{"b": 2}, {"c": 3}]}, box_merge_lists=strategy)
525 return bx.to_dict()
526
527 assert merged(None) == {"l": [2, 3], "d": [{"b": 2}, {"c": 3}]}
528 assert merged(False) == {"l": [2, 3], "d": [{"b": 2}, {"c": 3}]}

Callers

nothing calls this directly

Calls 3

merge_updateMethod · 0.95
to_dictMethod · 0.95
BoxClass · 0.90

Tested by

no test coverage detected