def test_lex_expression_complex():
 objs = tokenize('(foo 2.j)')
 assert (objs == [HyExpression([HySymbol('foo'), HyComplex(2j)])])
 objs = tokenize('(foo -0.5j)')
 assert (objs == [HyExpression([HySymbol('foo'), HyComplex((-0.5j))])])
 objs = tokenize('(foo 1.e7j)')
 assert (objs == [HyExpression([HySymbol('foo'), HyComplex(10000000j)])])
 objs = tokenize('(foo j)')
 assert (objs == [HyExpression([HySymbol('foo'), HySymbol('j')])])

def test_lex_expression_complex ( ) : objs = tokenize ( '(foo 2.j)' ) assert ( objs == [ HyExpression ( [ HySymbol ( 'foo' ) , HyComplex ( 2j ) ] ) ] ) objs = tokenize ( '(foo -0.5j)' ) assert ( objs == [ HyExpression ( [ HySymbol ( 'foo' ) , HyComplex ( ( - 0.5j ) ) ] ) ] ) objs = tokenize ( '(foo 1.e7j)' ) assert ( objs == [ HyExpression ( [ HySymbol ( 'foo' ) , HyComplex ( 10000000j ) ] ) ] ) objs = tokenize ( '(foo j)' ) assert ( objs == [ HyExpression ( [ HySymbol ( 'foo' ) , HySymbol ( 'j' ) ] ) ] )
make sure expressions can produce complex .