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

Method test_files

test/test_comments.py:98–105  ·  view source on GitHub ↗
(self, tmp_path)

Source from the content-addressed store, hash-verified

96 assert bx.to_yaml() == "1: one # first\n2.5: x\n"
97
98 def test_files(self, tmp_path):
99 path = tmp_path / "config.yaml"
100 path.write_text(DOCUMENT)
101 bx = Box.from_yaml(filename=path)
102 bx.set_comment("last", "still last")
103 out = tmp_path / "out.yaml"
104 assert bx.to_yaml(filename=out) is None
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"

Callers

nothing calls this directly

Calls 3

from_yamlMethod · 0.45
set_commentMethod · 0.45
to_yamlMethod · 0.45

Tested by

no test coverage detected