MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_scalars

Method test_scalars

test/ext/asyncio/test_session.py:308–321  ·  view source on GitHub ↗
(self, async_session, filter_)

Source from the content-addressed store, hash-verified

306 )
307 @async_test
308 async def test_scalars(self, async_session, filter_):
309 User = self.classes.User
310
311 stmt = (
312 select(User)
313 .options(selectinload(User.addresses))
314 .order_by(User.id)
315 )
316
317 if filter_ == "scalars":
318 result = (await async_session.scalars(stmt)).all()
319 elif filter_ == "stream_scalars":
320 result = await (await async_session.stream_scalars(stmt)).all()
321 eq_(result, self.static.user_address_result)
322
323 @async_test
324 async def test_get(self, async_session):

Callers

nothing calls this directly

Calls 8

selectFunction · 0.90
selectinloadFunction · 0.90
eq_Function · 0.90
order_byMethod · 0.45
optionsMethod · 0.45
allMethod · 0.45
scalarsMethod · 0.45
stream_scalarsMethod · 0.45

Tested by

no test coverage detected