MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / test_scalars

Method test_scalars

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

Source from the content-addressed store, hash-verified

214 )
215 @async_test
216 async def test_scalars(self, async_session, filter_):
217 User = self.classes.User
218
219 stmt = (
220 select(User)
221 .options(selectinload(User.addresses))
222 .order_by(User.id)
223 )
224
225 if filter_ == "scalars":
226 result = (await async_session.scalars(stmt)).all()
227 elif filter_ == "stream_scalars":
228 result = await (await async_session.stream_scalars(stmt)).all()
229 eq_(result, self.static.user_address_result)
230
231 @async_test
232 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