summaryrefslogtreecommitdiff
path: root/test/ext/asyncio/test_scoping_py3k.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2021-06-16 13:15:16 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2021-06-16 13:15:16 -0400
commit9bfae8f8609d5de11da34351b4a3e055b418e4cf (patch)
treeb6c95fb4adfa1a9b0bbba762480beaeed012d46f /test/ext/asyncio/test_scoping_py3k.py
parentd06133ba376ba4ab0b7117b2eb72d5fd29a43bb2 (diff)
downloadsqlalchemy-9bfae8f8609d5de11da34351b4a3e055b418e4cf.tar.gz
pin async scoping tests at python 3.7
as it relies upon asyncio.current_task that's not in 3.6 Change-Id: I2b09295bf736811f260640102214a531c9b9e816
Diffstat (limited to 'test/ext/asyncio/test_scoping_py3k.py')
-rw-r--r--test/ext/asyncio/test_scoping_py3k.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/ext/asyncio/test_scoping_py3k.py b/test/ext/asyncio/test_scoping_py3k.py
index 223c7d903..c2ca73c41 100644
--- a/test/ext/asyncio/test_scoping_py3k.py
+++ b/test/ext/asyncio/test_scoping_py3k.py
@@ -1,8 +1,7 @@
-from asyncio import current_task
-
import sqlalchemy as sa
from sqlalchemy import func
from sqlalchemy import select
+from sqlalchemy import testing
from sqlalchemy.ext.asyncio import async_scoped_session
from sqlalchemy.ext.asyncio import AsyncSession as _AsyncSession
from sqlalchemy.testing import async_test
@@ -12,8 +11,11 @@ from .test_session_py3k import AsyncFixture
class AsyncScopedSessionTest(AsyncFixture):
+ @testing.requires.python37
@async_test
async def test_basic(self, async_engine):
+ from asyncio import current_task
+
AsyncSession = async_scoped_session(
sa.orm.sessionmaker(async_engine, class_=_AsyncSession),
scopefunc=current_task,