コード例 #1
0
ファイル: test_helpers.py プロジェクト: LuckyDenis/aiohttp
async def test_set_exception_cancelled(loop) -> None:
    fut = loop.create_future()
    fut.cancel()
    helpers.set_exception(fut, RuntimeError())

    with pytest.raises(asyncio.CancelledError):
        await fut
コード例 #2
0
ファイル: test_helpers.py プロジェクト: youpengly/aiohttp
async def test_set_exception_cancelled(loop):
    fut = loop.create_future()
    fut.cancel()
    helpers.set_exception(fut, RuntimeError())

    with pytest.raises(asyncio.CancelledError):
        await fut
コード例 #3
0
ファイル: test_helpers.py プロジェクト: LuckyDenis/aiohttp
async def test_set_exception(loop) -> None:
    fut = loop.create_future()
    helpers.set_exception(fut, RuntimeError())
    with pytest.raises(RuntimeError):
        await fut
コード例 #4
0
ファイル: test_helpers.py プロジェクト: youpengly/aiohttp
async def test_set_exception(loop):
    fut = loop.create_future()
    helpers.set_exception(fut, RuntimeError())
    with pytest.raises(RuntimeError):
        await fut