test #10990
(self)
| 2284 | eq_(c2.all(), [C(c_expr=4)]) |
| 2285 | |
| 2286 | def test_non_cacheable_expr(self): |
| 2287 | """test #10990""" |
| 2288 | |
| 2289 | HasNonCacheable = self.classes.HasNonCacheable |
| 2290 | |
| 2291 | for i in range(3): |
| 2292 | s = fixture_session() |
| 2293 | |
| 2294 | stmt = ( |
| 2295 | select(HasNonCacheable) |
| 2296 | .where(HasNonCacheable.created > 10) |
| 2297 | .options( |
| 2298 | with_expression( |
| 2299 | HasNonCacheable.msg_translated, |
| 2300 | HasNonCacheable.created + 10, |
| 2301 | ) |
| 2302 | ) |
| 2303 | ) |
| 2304 | |
| 2305 | eq_( |
| 2306 | s.scalars(stmt).all(), |
| 2307 | [HasNonCacheable(id=1, created=12345, msg_translated=12355)], |
| 2308 | ) |
| 2309 | |
| 2310 | def test_reuse_expr(self): |
| 2311 | A = self.classes.A |
nothing calls this directly
no test coverage detected