MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / async_test_13091

Function async_test_13091

test/typing/plain_files/orm/session.py:217–228  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

215
216
217async def async_test_13091() -> None:
218 session = AsyncSession()
219 stmt = select(user_table.c.id)
220 assert_type(stmt, Select[Unpack[Tuple[Any, ...]]])
221 result = await session.execute(stmt)
222
223 assert_type(result, Result[Unpack[Tuple[Any, ...]]])
224 data1 = result.scalar()
225 assert_type(data1, Any | None)
226
227 data2 = await session.scalar(stmt)
228 assert_type(data2, Any | None)

Callers

nothing calls this directly

Calls 5

executeMethod · 0.95
scalarMethod · 0.95
AsyncSessionClass · 0.90
selectFunction · 0.90
scalarMethod · 0.45

Tested by

no test coverage detected