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

Method test_scalars

test/sql/test_resultset.py:309–321  ·  view source on GitHub ↗
(self, connection)

Source from the content-addressed store, hash-verified

307 eq_(len(rows), 3)
308
309 def test_scalars(self, connection):
310 users = self.tables.users
311
312 connection.execute(
313 users.insert(),
314 [
315 {"user_id": 7, "user_name": "jack"},
316 {"user_id": 8, "user_name": "ed"},
317 {"user_id": 9, "user_name": "fred"},
318 ],
319 )
320 r = connection.scalars(users.select().order_by(users.c.user_id))
321 eq_(r.all(), [7, 8, 9])
322
323 @expect_deprecated(".*is deprecated, Row now behaves like a tuple.*")
324 def test_result_tuples(self, connection):

Callers

nothing calls this directly

Calls 7

eq_Function · 0.90
executeMethod · 0.45
insertMethod · 0.45
scalarsMethod · 0.45
order_byMethod · 0.45
selectMethod · 0.45
allMethod · 0.45

Tested by

no test coverage detected