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

Method test_bad_file

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

Source from the content-addressed store, hash-verified

29 bl[1].Name = "Pat"
30
31 def test_bad_file(self):
32 with pytest.raises(BoxError):
33 box_from_file(Path(test_root, "data", "bad_file.txt"), file_type="json")
34 with pytest.raises(BoxError):
35 box_from_file(Path(test_root, "data", "bad_file.txt"), file_type="toml")
36 with pytest.raises(BoxError):
37 box_from_file(Path(test_root, "data", "bad_file.txt"), file_type="yaml")
38 with pytest.raises(BoxError):
39 box_from_file(Path(test_root, "data", "bad_file.txt"), file_type="msgpack")
40 with pytest.raises(BoxError):
41 box_from_file(Path(test_root, "data", "bad_file.txt"), file_type="unknown")
42 with pytest.raises(BoxError):
43 box_from_file(Path(test_root, "data", "bad_file.txt"))
44 with pytest.raises(BoxError):
45 box_from_file("does not exist")
46
47 def test_from_string_all(self):
48 with open(Path(test_root, "data", "json_file.json"), "r") as f:

Callers

nothing calls this directly

Calls 1

box_from_fileFunction · 0.90

Tested by

no test coverage detected