MCPcopy Create free account
hub / github.com/cdgriffith/Box / test_box_from_string_yaml

Method test_box_from_string_yaml

test/test_coverage_paths.py:356–360  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

354 box_from_string("= nope", string_type="toml")
355
356 def test_box_from_string_yaml(self):
357 assert box_from_string("a: 1", string_type="yaml").to_dict() == {"a": 1}
358 assert box_from_string("- 1\n- 2\n", string_type="yaml").to_list() == [1, 2]
359 with pytest.raises(BoxError, match="not YAML"):
360 box_from_string("a: [1", string_type="yaml")
361
362 def test_box_from_string_toon(self):
363 if not from_file.toon_available:

Callers

nothing calls this directly

Calls 3

box_from_stringFunction · 0.90
to_dictMethod · 0.80
to_listMethod · 0.80

Tested by

no test coverage detected