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

Function check_converted

test/test_audit_sync.py:59–69  ·  view source on GitHub ↗
(bl, **options)

Source from the content-addressed store, hash-verified

57
58
59def check_converted(bl, **options):
60 assert isinstance(bl, BoxList)
61 for item in bl:
62 assert not (isinstance(item, dict) and not isinstance(item, Box)), f"{item!r} not converted"
63 assert not (isinstance(item, list) and not isinstance(item, BoxList)), f"{item!r} not converted"
64 if isinstance(item, Box):
65 for k, v in options.items():
66 assert item._box_config[k] == v, f"option {k} not passed down to {item!r}"
67 if isinstance(item, BoxList):
68 for k, v in options.items():
69 assert item.box_options.get(k) == v, f"option {k} not passed down to {item!r}"
70
71
72def _setitem(bl, key, value):

Calls 2

getMethod · 0.80
itemsMethod · 0.45

Tested by

no test coverage detected