(self)
| 160 | Box(a=1).set_comment(*args) |
| 161 | |
| 162 | def test_missing_keys(self): |
| 163 | with pytest.raises(BoxKeyError, match="existing keys"): |
| 164 | Box().set_comment("missing", "x") |
| 165 | with pytest.raises(BoxKeyError): |
| 166 | Box().get_comment("missing") |
| 167 | with pytest.raises(BoxKeyError, match="existing items"): |
| 168 | BoxList([1]).set_comment(3, "x") |
| 169 | with pytest.raises(BoxKeyError): |
| 170 | Box(a={"b": 1}).set_comment("a.b", "x") # dotted paths need box_dots |
| 171 | |
| 172 | def test_box_dots_paths(self): |
| 173 | bx = Box({"a": {"b": 1}, "l": [{"x": 1}, 2]}, box_dots=True) |
nothing calls this directly
no test coverage detected