Test loading invalid YAML raises error.
(self, temp_dir)
| 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.""" |