def test_decode_error(self): field = fields.Float() self.assert_field_raises(field, 'not a float')
def test_raises(self): self.assert_field_raises(fields.Float(), 'bar')
def test_with_default(self): field = fields.Float(default=0.5) assert not field.required assert field.__schema__ == {'type': 'number', 'default': 0.5}
def test_value(self, value, expected): self.assert_field(fields.Float(), value, expected)
def test_defaults(self): field = fields.Float() assert not field.required assert field.__schema__ == {'type': 'number'}