MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_as_scalar

Method test_as_scalar

test/sql/test_deprecations.py:94–101  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

92 )
93
94 def test_as_scalar(self):
95 with testing.expect_deprecated(
96 r"The SelectBase.as_scalar\(\) method is deprecated and "
97 "will be removed in a future release."
98 ):
99 stmt = select(self.table1.c.myid).as_scalar()
100
101 is_true(stmt.compare(select(self.table1.c.myid).scalar_subquery()))
102
103 def test_as_scalar_from_subquery(self):
104 with testing.expect_deprecated(

Callers

nothing calls this directly

Calls 5

selectFunction · 0.90
is_trueFunction · 0.90
as_scalarMethod · 0.45
compareMethod · 0.45
scalar_subqueryMethod · 0.45

Tested by

no test coverage detected