def test_lex_expression_float():
 objs = tokenize('(foo 2.)')
 assert (objs == [HyExpression([HySymbol('foo'), HyFloat(2.0)])])
 objs = tokenize('(foo -0.5)')
 assert (objs == [HyExpression([HySymbol('foo'), HyFloat((-0.5))])])
 objs = tokenize('(foo 1.e7)')
 assert (objs == [HyExpression([HySymbol('foo'), HyFloat(10000000.0)])])

def test_lex_expression_float ( ) : objs = tokenize ( '(foo 2.)' ) assert ( objs == [ HyExpression ( [ HySymbol ( 'foo' ) , HyFloat ( 2.0 ) ] ) ] ) objs = tokenize ( '(foo -0.5)' ) assert ( objs == [ HyExpression ( [ HySymbol ( 'foo' ) , HyFloat ( ( - 0.5 ) ) ] ) ] ) objs = tokenize ( '(foo 1.e7)' ) assert ( objs == [ HyExpression ( [ HySymbol ( 'foo' ) , HyFloat ( 10000000.0 ) ] ) ] )
make sure expressions can produce floats .