| 1233 | ) |
| 1234 | @testing.fails_on("sqlite", "FIXME: unknown") |
| 1235 | def test_union_all(self, connection): |
| 1236 | t1, t2, t3 = self.tables("t1", "t2", "t3") |
| 1237 | |
| 1238 | e = union_all( |
| 1239 | select(t1.c.col3), |
| 1240 | union(select(t1.c.col3), select(t1.c.col3)), |
| 1241 | ) |
| 1242 | |
| 1243 | wanted = [("aaa",), ("aaa",), ("bbb",), ("bbb",), ("ccc",), ("ccc",)] |
| 1244 | found1 = self._fetchall_sorted(connection.execute(e)) |
| 1245 | eq_(found1, wanted) |
| 1246 | |
| 1247 | found2 = self._fetchall_sorted( |
| 1248 | connection.execute(e.alias("foo").select()) |
| 1249 | ) |
| 1250 | eq_(found2, wanted) |
| 1251 | |
| 1252 | def test_union_all_lightweight(self, connection): |
| 1253 | """like test_union_all, but breaks the sub-union into |