summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/sqlalchemy/sql/operators.py4
-rw-r--r--test/orm/query.py9
2 files changed, 9 insertions, 4 deletions
diff --git a/lib/sqlalchemy/sql/operators.py b/lib/sqlalchemy/sql/operators.py
index b8aca3d26..c1d2ebc87 100644
--- a/lib/sqlalchemy/sql/operators.py
+++ b/lib/sqlalchemy/sql/operators.py
@@ -29,8 +29,8 @@ def ilike_op(a, b):
def notilike_op(a, b):
raise NotImplementedError()
-def between_op(a, b):
- return a.between(b)
+def between_op(a, b, c):
+ return a.between(b, c)
def in_op(a, b):
return a.in_(*b)
diff --git a/test/orm/query.py b/test/orm/query.py
index c7847b321..b86c957c4 100644
--- a/test/orm/query.py
+++ b/test/orm/query.py
@@ -193,8 +193,13 @@ class OperatorTest(QueryTest):
fwd_sql + "'\n or\n'" + rev_sql + "'")
def test_in(self):
- self._test(User.id.in_('a', 'b'), "users.id IN (:users_id, :users_id_1)")
-
+ self._test(User.id.in_('a', 'b'),
+ "users.id IN (:users_id, :users_id_1)")
+
+ def test_between(self):
+ self._test(User.id.between('a', 'b'),
+ "users.id BETWEEN :users_id AND :users_id_1")
+
def test_clauses(self):
for (expr, compare) in (
(func.max(User.id), "max(users.id)"),