MCPcopy Create free account
hub / github.com/ScaleML/AgentSPEX / env_variable_yaml

Function env_variable_yaml

tests/tool_tests/test_yaml_integration.py:304–324  ·  view source on GitHub ↗

Create a workflow that uses environment variables

(test_yaml_dir)

Source from the content-addressed store, hash-verified

302
303@pytest.fixture
304def env_variable_yaml(test_yaml_dir):
305 """Create a workflow that uses environment variables"""
306 yaml_content = """
307name: "env_var_test_${TEST_ENV_VAR:-default}"
308goal: "Test environment variable expansion"
309
310parameters:
311 env_value: "${TEST_ENV_VAR:-fallback_value}"
312 project_name: "${PROJECT_NAME:-my_project}"
313
314workflow:
315 - task:
316 name: "use_env_vars"
317 instruction: "Process with env value: {{env_value}} for project {{project_name}}"
318"""
319
320 file_path = test_yaml_dir / "env_variable_workflow.yaml"
321 with open(file_path, "w") as f:
322 f.write(yaml_content)
323
324 return str(file_path)
325
326
327class TestYAMLWorkflowIntegration:

Callers

nothing calls this directly

Calls 1

writeMethod · 0.80

Tested by

no test coverage detected