Test the interaction between distinct and offset
(self, connection)
| 972 | |
| 973 | @testing.requires.offset |
| 974 | def test_select_distinct_offset(self, connection): |
| 975 | """Test the interaction between distinct and offset""" |
| 976 | |
| 977 | users, addresses = self.tables("users", "addresses") |
| 978 | |
| 979 | r = sorted( |
| 980 | [ |
| 981 | x[0] |
| 982 | for x in connection.execute( |
| 983 | select(addresses.c.address) |
| 984 | .distinct() |
| 985 | .offset(1) |
| 986 | .order_by(addresses.c.address) |
| 987 | ).fetchall() |
| 988 | ] |
| 989 | ) |
| 990 | eq_(len(r), 4) |
| 991 | self.assert_(r[0] != r[1] and r[1] != r[2] and r[2] != [3], repr(r)) |
| 992 | |
| 993 | @testing.requires.offset |
| 994 | def test_select_distinct_limit_offset(self, connection): |