Helper to actually run a coroutine passed to asyncio.run.
(coro)
| 1601 | |
| 1602 | # Helper: side_effect for asyncio.run that actually runs the coroutine |
| 1603 | def _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 | # --------------------------------------------------------------------------- |
no test coverage detected