(self, tmp_path, monkeypatch)
| 334 | box_from_file(bad) |
| 335 | |
| 336 | def test_toon_unavailable(self, tmp_path, monkeypatch): |
| 337 | monkeypatch.setattr(from_file, "toon_available", False) |
| 338 | path = tmp_path / "data.toon" |
| 339 | path.write_text("a: 1\n") |
| 340 | with pytest.raises(BoxError, match="toon"): |
| 341 | box_from_file(path) |
| 342 | with pytest.raises(BoxError, match="toon"): |
| 343 | box_from_string("a: 1", string_type="toon") |
| 344 | |
| 345 | def test_box_from_string_json(self): |
| 346 | assert box_from_string('{"a": 1}').to_dict() == {"a": 1} |
nothing calls this directly
no test coverage detected