def go(): scheduler = AsyncIOScheduler(loop) ran = False def action(scheduler, state): nonlocal ran ran = True scheduler.schedule(action) yield from asyncio.sleep(0.1, loop=loop) assert(ran == True)
def go(): scheduler = AsyncIOScheduler(loop) ran = False def action(scheduler, state): nonlocal ran ran = True scheduler.schedule(action) yield from asyncio.sleep(0.1, loop=loop) assert(ran is True)
def go(): scheduler = AsyncIOScheduler(loop) ran = [False] def action(scheduler, state): ran[0] = True scheduler.schedule(action) yield From(asyncio.sleep(0.1, loop=loop)) assert(ran[0] is True)
def go(): scheduler = AsyncIOScheduler(loop) ran = [False] def action(scheduler, state): ran[0] = True scheduler.schedule(action) yield From(asyncio.sleep(0.1, loop=loop)) assert (ran[0] is True)