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

Method test_save_config

tests/datasets/test_config.py:221–234  ·  view source on GitHub ↗

Test saving config to YAML file.

(self, temp_dir)

Source from the content-addressed store, hash-verified

219 assert config.datasets == []
220
221 def test_save_config(self, temp_dir):
222 """Test saving config to YAML file."""
223 config = StandardConfig(
224 datasets=[DatasetConfig(file_path="/data/test.json", source="Test")]
225 )
226 filepath = os.path.join(temp_dir, "output.yaml")
227 ConfigLoader.save(config, filepath)
228
229 assert os.path.exists(filepath)
230
231 # Verify saved content
232 loaded = ConfigLoader.load(filepath)
233 assert len(loaded.datasets) == 1
234 assert loaded.datasets[0].source == "Test"
235
236 def test_load_file_paths(self, temp_yaml_file):
237 """Test loading just file paths from config."""

Callers

nothing calls this directly

Calls 5

StandardConfigClass · 0.90
DatasetConfigClass · 0.90
existsMethod · 0.80
saveMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected