(self)
| 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 |
nothing calls this directly
no test coverage detected