MCPcopy Create free account
hub / github.com/zzzeek/sqlalchemy / test_sync_driver_run_sync

Method test_sync_driver_run_sync

test/ext/asyncio/test_engine.py:1549–1555  ·  view source on GitHub ↗
(self, async_engine)

Source from the content-addressed store, hash-verified

1547
1548 @async_test
1549 async def test_sync_driver_run_sync(self, async_engine):
1550 async with async_engine.connect() as conn:
1551 res = await conn.run_sync(
1552 lambda conn: conn.scalar(text("select 1"))
1553 )
1554 assert res == 1
1555 assert await conn.run_sync(lambda _: 2) == 2
1556
1557
1558class AsyncProxyTest(EngineFixture, fixtures.TestBase):

Callers

nothing calls this directly

Calls 4

textFunction · 0.90
connectMethod · 0.45
run_syncMethod · 0.45
scalarMethod · 0.45

Tested by

no test coverage detected