MCPcopy Create free account
hub / github.com/Open-Bee/DataStudio / test_load_invalid_yaml

Method test_load_invalid_yaml

tests/datasets/test_config.py:203–210  ·  view source on GitHub ↗

Test loading invalid YAML raises error.

(self, temp_dir)

Source from the content-addressed store, hash-verified

201 ConfigLoader.load("/nonexistent/config.yaml")
202
203 def test_load_invalid_yaml(self, temp_dir):
204 """Test loading invalid YAML raises error."""
205 filepath = os.path.join(temp_dir, "invalid.yaml")
206 with open(filepath, "w") as f:
207 f.write("invalid: yaml: content: {{")
208
209 with pytest.raises((yaml.YAMLError, Exception)):
210 ConfigLoader.load(filepath)
211
212 def test_load_empty_yaml(self, temp_dir):
213 """Test loading empty YAML file."""

Callers

nothing calls this directly

Calls 1

loadMethod · 0.45

Tested by

no test coverage detected