MCPcopy
hub / github.com/treeverse/dvc / test_apply_diff_seq

Function test_apply_diff_seq

tests/unit/utils/test_collections.py:49–59  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

47
48
49def test_apply_diff_seq():
50 src = [1]
51 dest = [MyInt(1)]
52 apply_diff(src, dest)
53 assert type(dest[0]) is MyInt, "Does not replace equals"
54
55 src = {"l": [1]}
56 inner = []
57 dest = {"l": inner}
58 apply_diff(src, dest)
59 assert dest["l"] is inner, "Updates inner lists"
60
61
62def is_serializable(d):

Callers

nothing calls this directly

Calls 2

apply_diffFunction · 0.90
MyIntClass · 0.85

Tested by

no test coverage detected