Skip to content

Commit c63836f

Browse files
committed
fix ut
1 parent d79b0cf commit c63836f

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

eval_protocol/mcp_env.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ async def rollout(
282282
raise ValueError("Either 'evaluation_rows' or 'dataset' must be provided when envs is a URL")
283283

284284
auto_model_id = model_id or getattr(policy, "model_id", "unknown")
285-
envs = make(envs, evaluation_rows=evaluation_rows, dataset=dataset, model_id=auto_model_id)
285+
envs = await make(envs, evaluation_rows=evaluation_rows, dataset=dataset, model_id=auto_model_id)
286286

287287
# Use the new ExecutionManager for execution
288288
execution_manager = ExecutionManager()

tests/test_rollout_control_plane_integration.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ async def test_rollout_creates_envs_from_url(self):
489489
policy = MockPolicy(["right"])
490490

491491
with (
492-
patch("eval_protocol.mcp_env.make") as mock_make,
492+
patch("eval_protocol.mcp_env.make", new_callable=AsyncMock) as mock_make,
493493
patch("eval_protocol.mcp_env.ExecutionManager") as MockManager,
494494
):
495495
mock_env = MagicMock()
@@ -512,7 +512,15 @@ async def test_rollout_creates_envs_from_url(self):
512512
dataset=dataset,
513513
model_id="test_model",
514514
)
515-
manager_instance.execute_rollouts.assert_called_once_with(mock_env, policy, 5, None, 8)
515+
516+
manager_instance.execute_rollouts.assert_called_once_with(
517+
mock_make.return_value,
518+
policy,
519+
5,
520+
None,
521+
8,
522+
)
523+
516524
assert result == ["ok"]
517525

518526
def test_control_plane_trajectory_serialization(self):

0 commit comments

Comments
 (0)