Merge remote-tracking branch 'origin/pr/188' into pr188

This commit is contained in:
Mike Bayer
2015-07-17 10:44:05 -04:00
2 changed files with 11 additions and 0 deletions
+8
View File
@@ -597,6 +597,14 @@ class ColumnOperators(Operators):
"""
return self.reverse_operate(div, other)
def __rmod__(self, other):
"""Implement the ``%`` operator in reverse.
See :meth:`.ColumnOperators.__mod__`.
"""
return self.reverse_operate(mod, other)
def between(self, cleft, cright, symmetric=False):
"""Produce a :func:`~.expression.between` clause against
the parent object, given the lower and upper range.
+3
View File
@@ -1327,6 +1327,9 @@ class MathOperatorTest(fixtures.TestBase, testing.AssertsCompiledSQL):
else:
self._test_math_op(operator.div, '/')
def test_math_op_mod(self):
self._test_math_op(operator.mod, '%')
class ComparisonOperatorTest(fixtures.TestBase, testing.AssertsCompiledSQL):
__dialect__ = 'default'