MCPcopy Create free account
hub / github.com/IBM/mcp-cli / test_variable_binding

Method test_variable_binding

tests/planning/test_executor.py:307–318  ·  view source on GitHub ↗

Result variables are stored and available to later steps.

(self, tmp_path)

Source from the content-addressed store, hash-verified

305
306 @pytest.mark.asyncio
307 async def test_variable_binding(self, tmp_path):
308 """Result variables are stored and available to later steps."""
309 tm = FakeToolManager(
310 {"read_file": "file contents", "search_code": "search hits"}
311 )
312 context = PlanningContext(tm, plans_dir=tmp_path / "plans")
313 runner = PlanRunner(context, enable_guards=False)
314
315 result = await runner.execute_plan(SAMPLE_PLAN, checkpoint=False)
316
317 assert result.variables.get("file_content") == "file contents"
318 assert result.variables.get("search_results") == "search hits"
319
320 @pytest.mark.asyncio
321 async def test_parallel_execution(self, tmp_path):

Callers

nothing calls this directly

Calls 5

execute_planMethod · 0.95
PlanningContextClass · 0.90
PlanRunnerClass · 0.90
FakeToolManagerClass · 0.70
getMethod · 0.45

Tested by

no test coverage detected