summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/asyncio.py
blob: 2e274de16fb1f3b40c817996e108b28b63321332 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from .assertions import assert_raises as _assert_raises
from .assertions import assert_raises_message as _assert_raises_message
from ..util import await_fallback as await_
from ..util import greenlet_spawn


async def assert_raises_async(except_cls, msg, coroutine):
    await greenlet_spawn(_assert_raises, except_cls, await_, coroutine)


async def assert_raises_message_async(except_cls, msg, coroutine):
    await greenlet_spawn(
        _assert_raises_message, except_cls, msg, await_, coroutine
    )