(self)
| 357 | box_from_string("- 1\n- 2\n", string_type="yaml") |
| 358 | |
| 359 | def test_box_from_string_json(self): |
| 360 | assert box_from_string('{"a": 1}').to_dict() == {"a": 1} |
| 361 | assert box_from_string("[1, 2]").to_list() == [1, 2] |
| 362 | with pytest.raises(BoxError, match="not JSON"): |
| 363 | box_from_string("{nope") |
| 364 | |
| 365 | def test_box_from_string_toml(self): |
| 366 | assert box_from_string("a = 1", string_type="toml").to_dict() == {"a": 1} |
nothing calls this directly
no test coverage detected