| 1392 | "sqlite can't handle leading parenthesis", |
| 1393 | ) |
| 1394 | def test_intersect_unions(self, connection): |
| 1395 | t1, t2, t3 = self.tables("t1", "t2", "t3") |
| 1396 | |
| 1397 | u = intersect( |
| 1398 | union(select(t1.c.col3, t1.c.col4), select(t3.c.col3, t3.c.col4)), |
| 1399 | union(select(t2.c.col3, t2.c.col4), select(t3.c.col3, t3.c.col4)) |
| 1400 | .alias() |
| 1401 | .select(), |
| 1402 | ) |
| 1403 | wanted = [("aaa", "ccc"), ("bbb", "aaa"), ("ccc", "bbb")] |
| 1404 | found = self._fetchall_sorted(connection.execute(u)) |
| 1405 | |
| 1406 | eq_(found, wanted) |
| 1407 | |
| 1408 | @testing.requires.intersect |
| 1409 | def test_intersect_unions_2(self, connection): |