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

Function test_dots_existing_path_writes

test/test_audit_sync.py:386–397  ·  view source on GitHub ↗
(path, value)

Source from the content-addressed store, hash-verified

384
385@pytest.mark.parametrize("path, value", EXISTING_PATHS)
386def test_dots_existing_path_writes(path, value):
387 for write in (
388 lambda b: b.__setitem__(path, "new"),
389 lambda b: b.update({path: "new"}),
390 lambda b: b.update(**{path: "new"}),
391 lambda b: b.merge_update({path: "new"}),
392 lambda b: b.__ior__({path: "new"}),
393 ):
394 b = dots_box()
395 write(b)
396 assert b[path] == "new"
397 assert path not in dict.keys(b), "dotted key stored literally"
398
399
400@pytest.mark.parametrize("path", MISSING_PATHS)

Callers

nothing calls this directly

Calls 6

dots_boxFunction · 0.85
__ior__Method · 0.80
keysMethod · 0.80
__setitem__Method · 0.45
updateMethod · 0.45
merge_updateMethod · 0.45

Tested by

no test coverage detected