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

Method test_box_dots

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

Source from the content-addressed store, hash-verified

2337 assert f == {}
2338
2339 def test_box_dots(self):
2340 b = _no_create_box(box_dots=True)
2341 b["a.b.c"] = 1
2342 b.d.e = 2
2343 assert b.to_dict() == {"a": {"b": {"c": 1}}, "d": {"e": 2}}
2344 # dotted lookups stay ephemeral and never create a literal dotted key
2345 c = b["z.y"]
2346 c.k = 1
2347 assert "z.y" not in b.keys()
2348 assert b.to_dict() == {"a": {"b": {"c": 1}}, "d": {"e": 2}}
2349
2350 def test_conversion_box_alias_registered(self):
2351 b = _no_create_box()

Callers

nothing calls this directly

Calls 3

_no_create_boxFunction · 0.85
to_dictMethod · 0.80
keysMethod · 0.45

Tested by

no test coverage detected