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

Method test_camel_killer_keys

test/test_comments.py:300–304  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

298 assert cb.to_yaml() == "host: y # renamed later\n"
299
300 def test_camel_killer_keys(self):
301 bx = Box.from_yaml("loadBalancer: x # lb\n", camel_killer_box=True)
302 assert bx.get_comment("load_balancer") == {"eol": "lb"}
303 assert bx.get_comment("loadBalancer") == {"eol": "lb"}
304 assert bx.to_yaml() == "load_balancer: x # lb\n"
305
306 def test_box_dots_split_keys_lose_comments_safely(self):
307 bx = Box.from_yaml("a.b: 1 # dotted\n", box_dots=True, default_box=True)

Callers

nothing calls this directly

Calls 3

from_yamlMethod · 0.45
get_commentMethod · 0.45
to_yamlMethod · 0.45

Tested by

no test coverage detected