| 183 | eq_(cs(stmt2.params({"x": x1}).params({"y": x2})).all(), [x1, x2]) |
| 184 | |
| 185 | def test_text(self, connection): |
| 186 | a = self.tables.a |
| 187 | |
| 188 | cs = connection.scalars |
| 189 | |
| 190 | for _ in range(3): |
| 191 | x0 = random.randint(1, 10) |
| 192 | stmt = text("select data from a where data = :x").params(x=x0) |
| 193 | eq_(cs(stmt).all(), [x0]) |
| 194 | |
| 195 | x1 = random.randint(1, 10) |
| 196 | eq_(cs(stmt.params({"x": x1})).all(), [x1]) |
| 197 | |
| 198 | x2 = random.randint(1, 10) |
| 199 | stmt2 = stmt.columns(a.c.data).params(x=x2) |
| 200 | eq_(cs(stmt2).all(), [x2]) |
| 201 | eq_(cs(stmt2, {"x": 1}).all(), [1]) |
| 202 | eq_(cs(stmt2.params(x=1)).all(), [1]) |