def test_in_dec(self):
     l = values.List(
         [values.Decimal(1.1),
          values.Decimal(2.2),
          values.Decimal(3.3)])
     r = values.Decimal(1.1)
     result = r.in_(l)
     assert result.value
 def test_in_dec_negative(self):
     l = values.List(
         [values.Decimal(1.1),
          values.Decimal(2.2),
          values.Decimal(3.3)])
     r = values.Decimal(4.3)
     result = r.in_(l)
     assert not result.value
 def _visit(self, decimal_expr):
     return values.Decimal(decimal_expr.value)
 def test_less_than_equals_dec(self):
     l = values.Decimal(2.5)
     r = values.Decimal(1.5)
     result = l.less_than_equals(r)
     assert not result.value
 def test_less_than_equals_dec_int(self):
     l = values.Integer(3)
     r = values.Decimal(2.5)
     result = l.less_than_equals(r)
     assert not result.value
 def test_minus_dec(self):
     l = values.Decimal(10.5)
     result = l.unary_minus()
     assert result.value == -10.5
 def test_eq_dec_negative(self):
     l = values.Decimal(1.5)
     r = values.Decimal(2.5)
     result = l.equals(r)
     assert not result.value
 def test_eq_dec(self):
     l = values.Decimal(1.5)
     r = values.Decimal(1.5)
     result = l.equals(r)
     assert result.value
 def test_eq_dec_int(self):
     l = values.Integer(1.5)
     r = values.Decimal(2.5)
     result = l.equals(r)
     assert not result.value
 def test_greater_than_dec(self):
     l = values.Decimal(2.5)
     r = values.Decimal(1.5)
     result = l.greater_than(r)
     assert result.value
 def test_greater_than_dec_int(self):
     l = values.Integer(3)
     r = values.Decimal(2.5)
     result = l.greater_than(r)
     assert result.value
 def test_greater_than_equals_dec_negative(self):
     l = values.Decimal(1.5)
     r = values.Decimal(2.5)
     result = l.greater_than_equals(r)
     assert not result.value
 def test_less_than_dec_negative(self):
     l = values.Decimal(1.5)
     r = values.Decimal(2.5)
     result = l.less_than(r)
     assert result.value