| 1443 | |
| 1444 | @testing.requires.intersect |
| 1445 | def test_composite_alias(self, connection): |
| 1446 | t1, t2, t3 = self.tables("t1", "t2", "t3") |
| 1447 | |
| 1448 | ua = intersect( |
| 1449 | select(t2.c.col3, t2.c.col4), |
| 1450 | union( |
| 1451 | select(t1.c.col3, t1.c.col4), |
| 1452 | select(t2.c.col3, t2.c.col4), |
| 1453 | select(t3.c.col3, t3.c.col4), |
| 1454 | ) |
| 1455 | .alias() |
| 1456 | .select(), |
| 1457 | ).alias() |
| 1458 | |
| 1459 | wanted = [("aaa", "bbb"), ("bbb", "ccc"), ("ccc", "aaa")] |
| 1460 | found = self._fetchall_sorted(connection.execute(ua.select())) |
| 1461 | eq_(found, wanted) |
| 1462 | |
| 1463 | |
| 1464 | class JoinTest(fixtures.TablesTest): |