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

Method test_skip_empty_and_none

tests/agents/test_loop.py:74–90  ·  view source on GitHub ↗

Loop skips None and empty messages.

(self)

Source from the content-addressed store, hash-verified

72
73 @pytest.mark.asyncio
74 async def test_skip_empty_and_none(self):
75 """Loop skips None and empty messages."""
76 ctx = _make_context()
77 ui = _make_ui()
78 q: asyncio.Queue = asyncio.Queue()
79 done = asyncio.Event()
80
81 await q.put(None)
82 await q.put("")
83 await q.put(" ")
84 await q.put("exit")
85
86 with patch("mcp_cli.chat.conversation.ConversationProcessor"):
87 await run_agent_loop(ctx, ui, q, done)
88
89 assert done.is_set()
90 ctx.add_user_message.assert_not_called()
91
92 @pytest.mark.asyncio
93 async def test_processes_prompt(self):

Callers

nothing calls this directly

Calls 3

run_agent_loopFunction · 0.90
_make_contextFunction · 0.70
_make_uiFunction · 0.70

Tested by

no test coverage detected