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

Method test_document_comments

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

Source from the content-addressed store, hash-verified

139 assert bx.get_comment("a") == {"eol": "already commented"}
140
141 def test_document_comments(self):
142 bx = Box(a=1)
143 bx.set_comment(None, "header\n\nmore")
144 bx.set_comment(None, "footer", position="end")
145 assert bx.to_yaml() == "# header\n\n# more\na: 1\n# footer\n"
146 bx.del_comment()
147 assert bx.to_yaml() == "a: 1\n"
148
149 @pytest.mark.parametrize(
150 "args, error",

Callers

nothing calls this directly

Calls 4

set_commentMethod · 0.95
to_yamlMethod · 0.95
del_commentMethod · 0.95
BoxClass · 0.90

Tested by

no test coverage detected