| 1293 | @testing.requires.except_ |
| 1294 | @testing.fails_on("sqlite", "Can't handle this style of nesting") |
| 1295 | def test_except_style1(self, connection): |
| 1296 | t1, t2, t3 = self.tables("t1", "t2", "t3") |
| 1297 | |
| 1298 | e = except_( |
| 1299 | union( |
| 1300 | select(t1.c.col3, t1.c.col4), |
| 1301 | select(t2.c.col3, t2.c.col4), |
| 1302 | select(t3.c.col3, t3.c.col4), |
| 1303 | ), |
| 1304 | select(t2.c.col3, t2.c.col4), |
| 1305 | ) |
| 1306 | |
| 1307 | wanted = [ |
| 1308 | ("aaa", "aaa"), |
| 1309 | ("aaa", "ccc"), |
| 1310 | ("bbb", "aaa"), |
| 1311 | ("bbb", "bbb"), |
| 1312 | ("ccc", "bbb"), |
| 1313 | ("ccc", "ccc"), |
| 1314 | ] |
| 1315 | |
| 1316 | found = self._fetchall_sorted(connection.execute(e.alias().select())) |
| 1317 | eq_(found, wanted) |
| 1318 | |
| 1319 | @testing.requires.except_ |
| 1320 | def test_except_style2(self, connection): |