def test_await_function_with_internal_loop(self): var = None async def a(arg): nonlocal var var = arg return arg ret = await_(a(42)) assert ret == 42 assert var == 42 bridge.stop() assert not bridge.running assert not asyncio.get_event_loop().is_running()
def tearDown(self): bridge.stop()