]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
restore test concurrency
authorFederico Caselli <cfederico87@gmail.com>
Sat, 27 Aug 2022 12:48:02 +0000 (14:48 +0200)
committerFederico Caselli <cfederico87@gmail.com>
Sat, 27 Aug 2022 12:48:02 +0000 (14:48 +0200)
Change-Id: I118ce933d1fd1203e97ef2959ee6def595f1fc0b

test/ext/asyncio/test_engine_py3k.py

index 8e6fdee7d9eb6c83bba4049df072260ab1fd49c5..c624c2108fa6c02da0dfde1fedcca5403bb36cd0 100644 (file)
@@ -1,3 +1,4 @@
+import asyncio
 import inspect as stdlib_inspect
 
 from sqlalchemy import Column
@@ -506,8 +507,8 @@ class AsyncEngineTest(EngineFixture):
     @async_test
     async def test_init_once_concurrency(self, async_engine):
         async with async_engine.connect() as c1, async_engine.connect() as c2:
-            eq_(await c1.scalar(select(1)), 1)
-            eq_(await c2.scalar(select(1)), 1)
+            coro = asyncio.wait([c1.scalar(select(1)), c2.scalar(select(2))])
+            eq_(await coro, [1, 2])
 
     @async_test
     async def test_connect_ctxmanager(self, async_engine):