Пример #1
0
    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()
Пример #2
0
 def tearDown(self):
     bridge.stop()