def test_less_equal(self): for less in [ LessEqual(self.table.c1, self.table.c2), self.table.c1 <= self.table.c2, ~Greater(self.table.c1, self.table.c2) ]: self.assertEqual(str(less), '("c1" <= "c2")') self.assertEqual(less.params, ())
def test_greater(self): for greater in [ Greater(self.table.c1, self.table.c2), self.table.c1 > self.table.c2, ~LessEqual(self.table.c1, self.table.c2) ]: self.assertEqual(str(greater), '("c1" > "c2")') self.assertEqual(greater.params, ())
def __gt__(self, other): from sql.operators import Greater return Greater(self, other)