def test_decimal():
 assert (hug.types.decimal('1.1') == Decimal('1.1'))
 assert (hug.types.decimal('1') == Decimal('1'))
 assert (hug.types.decimal(1.1) == Decimal(1.1))
 with pytest.raises(ValueError):
  hug.types.decimal('bacon')

def test_decimal ( ) : assert ( hug . types . decimal ( '1.1' ) == Decimal ( '1.1' ) ) assert ( hug . types . decimal ( '1' ) == Decimal ( '1' ) ) assert ( hug . types . decimal ( 1.1 ) == Decimal ( 1.1 ) ) with pytest . raises ( ValueError ) : hug . types . decimal ( 'bacon' )
tests to ensure the decimal type correctly allows decimal values .