(self, tmp_path)
| 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" |
nothing calls this directly
no test coverage detected