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

Method test_box_list_documents

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

Source from the content-addressed store, hash-verified

105 assert out.read_text() == DOCUMENT.replace("last: 1\n", "last: 1 # still last\n")
106
107 def test_box_list_documents(self):
108 src = "# people\n- name: a # first\n# then\n- name: b\n"
109 bl = BoxList.from_yaml(src)
110 assert bl.get_comment(None) == {"start": "people"}
111 assert bl[0].get_comment("name") == {"eol": "first"}
112 assert bl.get_comment(1) == {"before": "then"}
113 assert bl.to_yaml() == src
114
115
116class TestApi:

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