| 219 | ) |
| 220 | |
| 221 | def test_text_doesnt_explode(self, connection): |
| 222 | info_table = self.tables.info_table |
| 223 | |
| 224 | for s in [ |
| 225 | select( |
| 226 | case( |
| 227 | (info_table.c.info == "pk_4_data", text("'yes'")), |
| 228 | else_=text("'no'"), |
| 229 | ) |
| 230 | ).order_by(info_table.c.info), |
| 231 | select( |
| 232 | case( |
| 233 | ( |
| 234 | info_table.c.info == "pk_4_data", |
| 235 | literal_column("'yes'"), |
| 236 | ), |
| 237 | else_=literal_column("'no'"), |
| 238 | ) |
| 239 | ).order_by(info_table.c.info), |
| 240 | ]: |
| 241 | eq_( |
| 242 | connection.execute(s).all(), |
| 243 | [("no",), ("no",), ("no",), ("yes",), ("no",), ("no",)], |
| 244 | ) |
| 245 | |
| 246 | def test_text_doenst_explode_even_in_whenlist(self): |
| 247 | """test #7287""" |