summaryrefslogtreecommitdiff
path: root/test/ext/asyncio/test_session_py3k.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2021-09-01 08:58:06 -0400
committermike bayer <mike_mp@zzzcomputing.com>2021-09-02 14:19:20 +0000
commitd640192877e4d1da75e8dea34d2374c404e80538 (patch)
tree9bb87b162c50ad6385949bc47369388752f020f5 /test/ext/asyncio/test_session_py3k.py
parentbf1fe670513abeb1596bc5266f50db1ffe62f3bd (diff)
downloadsqlalchemy-d640192877e4d1da75e8dea34d2374c404e80538.tar.gz
add asyncio.gather() example; add connection opts
while I dont like this approach very much, people will likely be asking for it a lot, so represent the most correct and efficient form we can handle right now. Added missing ``**kw`` arguments to the :meth:`_asyncio.AsyncSession.connection` method. Change-Id: Idadae2a02a4d96ecb96a5723ce64d017ab4c6217 References: https://github.com/sqlalchemy/sqlalchemy/discussions/6965
Diffstat (limited to 'test/ext/asyncio/test_session_py3k.py')
-rw-r--r--test/ext/asyncio/test_session_py3k.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ext/asyncio/test_session_py3k.py b/test/ext/asyncio/test_session_py3k.py
index 459d95ea6..4165991d4 100644
--- a/test/ext/asyncio/test_session_py3k.py
+++ b/test/ext/asyncio/test_session_py3k.py
@@ -615,6 +615,17 @@ class AsyncProxyTest(AsyncFixture):
is_(c1.engine, c2.engine)
@async_test
+ async def test_get_connection_kws(self, async_session):
+ c1 = await async_session.connection(
+ execution_options={"isolation_level": "AUTOCOMMIT"}
+ )
+
+ eq_(
+ c1.sync_connection._execution_options,
+ {"isolation_level": "AUTOCOMMIT"},
+ )
+
+ @async_test
async def test_get_connection_connection_bound(self, async_engine):
async with async_engine.begin() as conn:
async_session = AsyncSession(conn)