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

Method test_from_all

test/test_from_file.py:12–23  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

10
11class TestFromFile:
12 def test_from_all(self):
13 assert isinstance(box_from_file(Path(test_root, "data", "json_file.json")), Box)
14 assert isinstance(box_from_file(Path(test_root, "data", "toml_file.tml")), Box)
15 assert isinstance(box_from_file(Path(test_root, "data", "yaml_file.yaml")), Box)
16 assert isinstance(box_from_file(Path(test_root, "data", "json_file.json"), file_type="json"), Box)
17 assert isinstance(box_from_file(Path(test_root, "data", "toml_file.tml"), file_type="toml"), Box)
18 assert isinstance(box_from_file(Path(test_root, "data", "yaml_file.yaml"), file_type="yaml"), Box)
19 assert isinstance(box_from_file(Path(test_root, "data", "json_list.json")), BoxList)
20 assert isinstance(box_from_file(Path(test_root, "data", "yaml_list.yaml")), BoxList)
21 assert isinstance(box_from_file(Path(test_root, "data", "msgpack_file.msgpack")), Box)
22 assert isinstance(box_from_file(Path(test_root, "data", "msgpack_list.msgpack")), BoxList)
23 assert isinstance(box_from_file(Path(test_root, "data", "csv_file.csv")), BoxList)
24
25 def test_bad_file(self):
26 with pytest.raises(BoxError):

Callers

nothing calls this directly

Calls 1

box_from_fileFunction · 0.90

Tested by

no test coverage detected