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

Function _run_coro

tests/cli/test_main_coverage.py:1603–1609  ·  view source on GitHub ↗

Helper to actually run a coroutine passed to asyncio.run.

(coro)

Source from the content-addressed store, hash-verified

1601
1602# Helper: side_effect for asyncio.run that actually runs the coroutine
1603def _run_coro(coro):
1604 """Helper to actually run a coroutine passed to asyncio.run."""
1605 loop = asyncio.new_event_loop()
1606 try:
1607 return loop.run_until_complete(coro)
1608 finally:
1609 loop.close()
1610
1611
1612# ---------------------------------------------------------------------------

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected