Exemplo n.º 1
0
async def test_set_result_cancelled(loop) -> None:
    fut = loop.create_future()
    fut.cancel()
    helpers.set_result(fut, 123)

    with pytest.raises(asyncio.CancelledError):
        await fut
Exemplo n.º 2
0
async def test_set_result_cancelled(loop):
    fut = loop.create_future()
    fut.cancel()
    helpers.set_result(fut, 123)

    with pytest.raises(asyncio.CancelledError):
        await fut
Exemplo n.º 3
0
async def test_set_result(loop) -> None:
    fut = loop.create_future()
    helpers.set_result(fut, 123)
    assert 123 == await fut
Exemplo n.º 4
0
async def test_set_result(loop):
    fut = loop.create_future()
    helpers.set_result(fut, 123)
    assert 123 == await fut