Skip to content

Commit 29bd451

Browse files
committed
Fix test_prepare_19_concurrent_calls
1 parent 14ab4f2 commit 29bd451

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/test_prepare.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,16 +353,15 @@ async def test_prepare_18_empty_result(self):
353353
self.assertIsNone(await self.con.fetchrow(''))
354354

355355
async def test_prepare_19_concurrent_calls(self):
356-
st = self.loop.create_task(self.con.prepare(
356+
st = self.loop.create_task(self.con.fetchval(
357357
'SELECT ROW(pg_sleep(0.02), 1)'))
358358
await asyncio.sleep(0, loop=self.loop)
359359

360360
with self.assertRaisesRegex(asyncpg.InterfaceError,
361361
'another operation'):
362362
await self.con.execute('SELECT 2')
363363

364-
st = await st
365-
self.assertEqual(await st.fetchval(), (None, 1))
364+
self.assertEqual(await st, (None, 1))
366365

367366
async def test_prepare_20_concurrent_calls(self):
368367
for methname, val in [('fetch', [(1,)]),

0 commit comments

Comments
 (0)