summaryrefslogtreecommitdiff
path: root/test/ext/asyncio/test_session_py3k.py
diff options
context:
space:
mode:
authorFederico Caselli <cfederico87@gmail.com>2021-08-27 21:50:01 +0200
committerMike Bayer <mike_mp@zzzcomputing.com>2021-08-30 14:19:36 -0400
commit1798c3cf1c407ba2a05855e97ae39997f213084d (patch)
treed6a171e80b6b988f089c574320ec7a916245ad2c /test/ext/asyncio/test_session_py3k.py
parent9131a5208f28ea3c2991c2b05873a495c1a9c851 (diff)
downloadsqlalchemy-1798c3cf1c407ba2a05855e97ae39997f213084d.tar.gz
Improve error message when inspecting async proxies
Provide better error message when trying to insepct and async engine or asnyc connection. Change-Id: I907f3a22c6b76fe43df9d40cb0e69c57f74a7982
Diffstat (limited to 'test/ext/asyncio/test_session_py3k.py')
-rw-r--r--test/ext/asyncio/test_session_py3k.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/test/ext/asyncio/test_session_py3k.py b/test/ext/asyncio/test_session_py3k.py
index ebedfedbf..a0aaf7ee0 100644
--- a/test/ext/asyncio/test_session_py3k.py
+++ b/test/ext/asyncio/test_session_py3k.py
@@ -580,12 +580,10 @@ class AsyncEventTest(AsyncFixture):
@async_test
async def test_no_async_listeners(self, async_session):
- with testing.expect_raises(
+ with testing.expect_raises_message(
NotImplementedError,
- "NotImplementedError: asynchronous events are not implemented "
- "at this time. Apply synchronous listeners to the "
- "AsyncEngine.sync_engine or "
- "AsyncConnection.sync_connection attributes.",
+ "asynchronous events are not implemented at this time. "
+ "Apply synchronous listeners to the AsyncSession.sync_session.",
):
event.listen(async_session, "before_flush", mock.Mock())