| 1324 | "sqlite can't handle leading parenthesis", |
| 1325 | ) |
| 1326 | def test_intersect_unions(self, connection): |
| 1327 | t1, t2, t3 = self.tables("t1", "t2", "t3") |
| 1328 | |
| 1329 | u = intersect( |
| 1330 | union(select(t1.c.col3, t1.c.col4), select(t3.c.col3, t3.c.col4)), |
| 1331 | union(select(t2.c.col3, t2.c.col4), select(t3.c.col3, t3.c.col4)) |
| 1332 | .alias() |
| 1333 | .select(), |
| 1334 | ) |
| 1335 | wanted = [("aaa", "ccc"), ("bbb", "aaa"), ("ccc", "bbb")] |
| 1336 | found = self._fetchall_sorted(connection.execute(u)) |
| 1337 | |
| 1338 | eq_(found, wanted) |
| 1339 | |
| 1340 | @testing.requires.intersect |
| 1341 | def test_intersect_unions_2(self, connection): |