Your lightweight open-source personal agent.
Python agent-frameworkai-agentai-agentschatbotchatopsdiscord-botllm-agentsllmslocal-llmmcpmodel-context-protocolmulti-agentopenai-compatibleopenclawpersonal-ai-assistantpythonself-hostedtelegram-bot-ai-assistantwebuiworkflow-automation
test(gateway): align runtime-tasks gather tests with bounded retrieval
arcdrake22c6bd5f0075df
diff --git a/tests/cli/test_gateway_runtime.py b/tests/cli/test_gateway_runtime.pyindex 14c20f973..daf022350 100644--- a/tests/cli/test_gateway_runtime.py+++ b/tests/cli/test_gateway_runtime.py@@ -9,6 +9,7 @@ block the stop.import asyncioimport time+from contextlib import suppressfrom nanobot.cli.gateway_runtime import _close_gateway_runtime@@ -160,7 +161,10 @@ async def test_duplicate_cleanup_is_idempotent() -> None:async def test_finished_runtime_tasks_gather_is_retrieved() -> None:agent = _FakeAgent()channels = _FakeChannels()- runtime_tasks = asyncio.gather(asyncio.sleep(0))+ finished = asyncio.get_running_loop().create_future()+ finished.set_result(None)+ runtime_tasks = asyncio.gather(finished)+ await asyncio.sleep(0) # let the gather observe the finished childawait _close_gateway_runtime(agent, channels, [], runtime_tasks)@@ -175,6 +179,8 @@ async def test_cancelled_runtime_tasks_gather_does_not_raise() -> None:runtime_tasks.cancel()await _close_gateway_runtime(agent, channels, [], runtime_tasks)+ with suppress(asyncio.CancelledError):+ await runtime_tasks # settle the cancelled gather without raisingassert runtime_tasks.done() # the cancelled gather was awaited without raisingassert agent.close_calls == 1