def test_preprocessor_expression():
 obj = macroexpand(tokenize('(test (test "one" "two"))')[0], HyASTCompiler(__name__))
 assert (type(obj) == HyList)
 assert (type(obj[0]) == HyExpression)
 assert (obj[0] == HyExpression([HySymbol('test'), HyString('one'), HyString('two')]))
 obj = HyList([HyString('one'), HyString('two')])
 obj = tokenize('(shill ["one" "two"])')[0][1]
 assert (obj == macroexpand(obj, HyASTCompiler('')))

def test_preprocessor_expression ( ) : obj = macroexpand ( tokenize ( '(test (test "one" "two"))' ) [ 0 ] , HyASTCompiler ( __name__ ) ) assert ( type ( obj ) == HyList ) assert ( type ( obj [ 0 ] ) == HyExpression ) assert ( obj [ 0 ] == HyExpression ( [ HySymbol ( 'test' ) , HyString ( 'one' ) , HyString ( 'two' ) ] ) ) obj = HyList ( [ HyString ( 'one' ) , HyString ( 'two' ) ] ) obj = tokenize ( '(shill ["one" "two"])' ) [ 0 ] [ 1 ] assert ( obj == macroexpand ( obj , HyASTCompiler ( '' ) ) )
test that macro expansion doesnt recurse .