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

Function temp_yaml_file

tests/conftest.py:117–130  ·  view source on GitHub ↗

Create a temporary YAML config file.

(temp_dir)

Source from the content-addressed store, hash-verified

115
116@pytest.fixture
117def temp_yaml_file(temp_dir):
118 """Create a temporary YAML config file."""
119 import yaml
120
121 filepath = os.path.join(temp_dir, "test_config.yaml")
122 config = {
123 "datasets": [
124 {"file_path": "data1.json", "source": "TestSource1"},
125 {"file_path": "data2.json", "source": "TestSource2"},
126 ]
127 }
128 with open(filepath, "w", encoding="utf-8") as f:
129 yaml.dump(config, f)
130 return filepath
131
132
133# =============================================================================

Callers

nothing calls this directly

Calls 1

dumpMethod · 0.80

Tested by

no test coverage detected