tokio/pytest_plugin.py
def create_task(loop, loop_type):
    """Return an instance of the Task."""
    def _create_task(coro):
        if loop_type == 'current':
            return loop.create_task(coro)
        elif loop_type == 'asyncio':
            return asyncio.Task(coro, loop=loop)

    yield _create_task
Return an instance of the Task.
Return an instance of the Task.
Return an instance of the Task .
def create_task(loop, loop_type):
    def _create_task(coro):
        if loop_type == 'current':
            return loop.create_task(coro)
        elif loop_type == 'asyncio':
            return asyncio.Task(coro, loop=loop)
    yield _create_task
def create_task ( loop , loop_type ) : def _create_task ( coro ) : if loop_type == 'current' : return loop . create_task ( coro ) elif loop_type == 'asyncio' : return asyncio . Task ( coro , loop = loop ) yield _create_task
Return an instance of the Task.
Return an instance of the Task .
"""Return an instance of the Task."""
loop
loop_type