| 1339 | |
| 1340 | @testing.requires.intersect |
| 1341 | def test_intersect_unions_2(self, connection): |
| 1342 | t1, t2, t3 = self.tables("t1", "t2", "t3") |
| 1343 | |
| 1344 | u = intersect( |
| 1345 | union(select(t1.c.col3, t1.c.col4), select(t3.c.col3, t3.c.col4)) |
| 1346 | .alias() |
| 1347 | .select(), |
| 1348 | union(select(t2.c.col3, t2.c.col4), select(t3.c.col3, t3.c.col4)) |
| 1349 | .alias() |
| 1350 | .select(), |
| 1351 | ) |
| 1352 | wanted = [("aaa", "ccc"), ("bbb", "aaa"), ("ccc", "bbb")] |
| 1353 | found = self._fetchall_sorted(connection.execute(u)) |
| 1354 | |
| 1355 | eq_(found, wanted) |
| 1356 | |
| 1357 | @testing.requires.intersect |
| 1358 | def test_intersect_unions_3(self, connection): |