Test the interaction between limit and offset
(self, connection)
| 941 | |
| 942 | @testing.requires.offset |
| 943 | def test_select_limit_offset(self, connection): |
| 944 | """Test the interaction between limit and offset""" |
| 945 | |
| 946 | users, addresses = self.tables("users", "addresses") |
| 947 | |
| 948 | r = connection.execute( |
| 949 | users.select().limit(3).offset(2).order_by(users.c.user_id) |
| 950 | ).fetchall() |
| 951 | self.assert_(r == [(3, "ed"), (4, "wendy"), (5, "laura")]) |
| 952 | r = connection.execute( |
| 953 | users.select().offset(5).order_by(users.c.user_id) |
| 954 | ).fetchall() |
| 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""" |