(self, user_address_fixture)
| 189 | eq_(result.all(), [(e["id"],) for e in data if e["name"] in case]) |
| 190 | |
| 191 | def test_in_expr_compile(self, user_address_fixture): |
| 192 | users, _ = user_address_fixture |
| 193 | |
| 194 | def go(val): |
| 195 | stmt = lambdas.lambda_stmt(lambda: select(users.c.id)) |
| 196 | stmt += lambda s: s.where(users.c.name.in_(val)) |
| 197 | stmt += lambda s: s.order_by(users.c.id) |
| 198 | return stmt |
| 199 | |
| 200 | # note this also requires the type of the bind is copied |
| 201 | self.assert_compile( |
| 202 | go([]), |
| 203 | "SELECT users.id FROM users " |
| 204 | "WHERE users.name IN (NULL) AND (1 != 1) ORDER BY users.id", |
| 205 | literal_binds=True, |
| 206 | ) |
| 207 | self.assert_compile( |
| 208 | go(["u1", "u2"]), |
| 209 | "SELECT users.id FROM users " |
| 210 | "WHERE users.name IN ('u1', 'u2') ORDER BY users.id", |
| 211 | literal_binds=True, |
| 212 | ) |
| 213 | |
| 214 | def test_bind_type(self, user_address_fixture): |
| 215 | users, _ = user_address_fixture |
nothing calls this directly
no test coverage detected