Skip to content

Commit da78af9

Browse files
committed
Update test_checkpoint_resume.py
1 parent f86e2ce commit da78af9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/test_checkpoint_resume.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,13 @@ async def run_test():
308308
)
309309

310310
# Mock the parallel controller to avoid API calls
311-
with patch.object(controller, "parallel_controller") as mock_parallel:
311+
with patch("openevolve.controller.ProcessParallelController") as mock_parallel_class:
312+
mock_parallel = MagicMock()
312313
mock_parallel.run_evolution = AsyncMock(return_value=None)
314+
mock_parallel.start = MagicMock()
315+
mock_parallel.stop = MagicMock()
316+
mock_parallel.shutdown_event.is_set.return_value = False
317+
mock_parallel_class.return_value = mock_parallel
313318

314319
# Run first time
315320
result1 = await controller.run(iterations=0)

0 commit comments

Comments
 (0)