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

Method test_box_dots

test/test_box.py:2274–2283  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2272 assert f == {}
2273
2274 def test_box_dots(self):
2275 b = _no_create_box(box_dots=True)
2276 b["a.b.c"] = 1
2277 b.d.e = 2
2278 assert b.to_dict() == {"a": {"b": {"c": 1}}, "d": {"e": 2}}
2279 # dotted lookups stay ephemeral and never create a literal dotted key
2280 c = b["z.y"]
2281 c.k = 1
2282 assert "z.y" not in b.keys()
2283 assert b.to_dict() == {"a": {"b": {"c": 1}}, "d": {"e": 2}}
2284
2285 def test_conversion_box_alias_registered(self):
2286 b = _no_create_box()

Callers

nothing calls this directly

Calls 3

_no_create_boxFunction · 0.85
to_dictMethod · 0.80
keysMethod · 0.80

Tested by

no test coverage detected