Test the interaction between limit and distinct
(self, connection)
| 955 | self.assert_(r == [(6, "ralph"), (7, "fido")]) |
| 956 | |
| 957 | def test_select_distinct_limit(self, connection): |
| 958 | """Test the interaction between limit and distinct""" |
| 959 | |
| 960 | users, addresses = self.tables("users", "addresses") |
| 961 | |
| 962 | r = sorted( |
| 963 | [ |
| 964 | x[0] |
| 965 | for x in connection.execute( |
| 966 | select(addresses.c.address).distinct().limit(3) |
| 967 | ) |
| 968 | ] |
| 969 | ) |
| 970 | self.assert_(len(r) == 3, repr(r)) |
| 971 | self.assert_(r[0] != r[1] and r[1] != r[2], repr(r)) |
| 972 | |
| 973 | @testing.requires.offset |
| 974 | def test_select_distinct_offset(self, connection): |