Test the interaction between distinct and offset
(self, connection)
| 1040 | |
| 1041 | @testing.requires.offset |
| 1042 | def test_select_distinct_offset(self, connection): |
| 1043 | """Test the interaction between distinct and offset""" |
| 1044 | |
| 1045 | users, addresses = self.tables("users", "addresses") |
| 1046 | |
| 1047 | r = sorted( |
| 1048 | [ |
| 1049 | x[0] |
| 1050 | for x in connection.execute( |
| 1051 | select(addresses.c.address) |
| 1052 | .distinct() |
| 1053 | .offset(1) |
| 1054 | .order_by(addresses.c.address) |
| 1055 | ).fetchall() |
| 1056 | ] |
| 1057 | ) |
| 1058 | eq_(len(r), 4) |
| 1059 | self.assert_(r[0] != r[1] and r[1] != r[2] and r[2] != [3], repr(r)) |
| 1060 | |
| 1061 | @testing.requires.offset |
| 1062 | def test_select_distinct_limit_offset(self, connection): |