(self)
| 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 | |
| 116 | class TestApi: |
nothing calls this directly
no test coverage detected