tokio/test_utils.py
def loop_context(loop_factory, fast=False):
    """A contextmanager that creates an event_loop, for test purposes.

    Handles the creation and cleanup of a test loop.
    """
    asyncio.set_event_loop_policy(loop_factory())
    loop = setup_test_loop(loop_factory)
    yield loop
    teardown_test_loop(loop, fast=fast)
A contextmanager that creates an event_loop, for test purposes.

    Handles the creation and cleanup of a test loop.
    
A contextmanager that creates an event_loop, for test purposes.
Handles the creation and cleanup of a test loop.
A contextmanager that creates an event_loop for test purposes . Handles the creation and cleanup of a test loop .
def loop_context(loop_factory, fast=False):
    asyncio.set_event_loop_policy(loop_factory())
    loop = setup_test_loop(loop_factory)
    yield loop
    teardown_test_loop(loop, fast=fast)
def loop_context ( loop_factory , fast = False ) : asyncio . set_event_loop_policy ( loop_factory ( ) ) loop = setup_test_loop ( loop_factory ) yield loop teardown_test_loop ( loop , fast = fast )
A contextmanager that creates an event_loop, for test purposes.
A contextmanager that creates an event_loop for test purposes .
"""A contextmanager that creates an event_loop, for test purposes.

    Handles the creation and cleanup of a test loop.
    """
loop_factory
fast