MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_simple_expr

Method test_simple_expr

test/orm/test_deferred.py:2252–2263  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2250 s.commit()
2251
2252 def test_simple_expr(self):
2253 A = self.classes.A
2254
2255 s = fixture_session()
2256 a1 = (
2257 s.query(A)
2258 .options(with_expression(A.my_expr, A.x + A.y))
2259 .filter(A.x > 1)
2260 .order_by(A.id)
2261 )
2262
2263 eq_(a1.all(), [A(my_expr=5), A(my_expr=15), A(my_expr=12)])
2264
2265 def test_expr_default_value(self):
2266 A = self.classes.A

Callers

nothing calls this directly

Calls 9

fixture_sessionFunction · 0.90
with_expressionFunction · 0.90
eq_Function · 0.90
AClass · 0.70
order_byMethod · 0.45
filterMethod · 0.45
optionsMethod · 0.45
queryMethod · 0.45
allMethod · 0.45

Tested by

no test coverage detected