def test_div(self): for div in [ Div(self.table.c1, self.table.c2), self.table.c1 / self.table.c2 ]: self.assertEqual(str(div), '("c1" / "c2")') self.assertEqual(div.params, ())
def __floordiv__(self, other): from sql.functions import Div return Div(self, other)
def __div__(self, other): from sql.operators import Div return Div(self, other)