(self)
| 10 | |
| 11 | class 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): |
nothing calls this directly
no test coverage detected