summaryrefslogtreecommitdiff
path: root/test/base
diff options
context:
space:
mode:
authorFederico Caselli <cfederico87@gmail.com>2021-01-12 22:00:59 +0100
committerFederico Caselli <cfederico87@gmail.com>2021-01-21 21:38:05 +0100
commitbb846d1650423ce8013feb93b3c8837b4c5498a0 (patch)
tree2d07156f92af86df3db35d016f193d84f0082ec0 /test/base
parent851a3a362ee5e05b8438f92e2e1df63c68f79d68 (diff)
downloadsqlalchemy-bb846d1650423ce8013feb93b3c8837b4c5498a0.tar.gz
Improve error message when await_ call errors
Fixes: #5832 Change-Id: Ia2ed8f1d1ec54e5f6e1a8f817a69446fdb3b7f6d
Diffstat (limited to 'test/base')
-rw-r--r--test/base/test_concurrency_py3k.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/base/test_concurrency_py3k.py b/test/base/test_concurrency_py3k.py
index e7ae8c9ad..25ce9e7ec 100644
--- a/test/base/test_concurrency_py3k.py
+++ b/test/base/test_concurrency_py3k.py
@@ -57,7 +57,7 @@ class TestAsyncioCompat(fixtures.TestBase):
async def test_await_only_no_greenlet(self):
to_await = run1()
with expect_raises_message(
- exc.InvalidRequestError,
+ exc.MissingGreenlet,
r"greenlet_spawn has not been called; can't call await_\(\) here.",
):
await_only(to_await)
@@ -80,7 +80,7 @@ class TestAsyncioCompat(fixtures.TestBase):
await_fallback(inner_await())
with expect_raises_message(
- exc.InvalidRequestError,
+ exc.MissingGreenlet,
"greenlet_spawn has not been called and asyncio event loop",
):
await greenlet_spawn(go)