#NEWLINE# def test_function( self ) : #NEWLINE# #INDENT# compiler = Compiler ( ) #NEWLINE# result = compiler . compile ( 'foo()' ) #NEWLINE# self . assertIsInstance ( result , Function ) #NEWLINE# self . assertEqual ( result . name , 'foo' ) #NEWLINE# self . assertEqual ( result . reference , [ 'foo' ] ) #NEWLINE# self . assertEqual ( result . args , [ ] ) #NEWLINE# result = compiler . compile ( 'foo.bar.baz()' ) #NEWLINE# self . assertIsInstance ( result , Function ) #NEWLINE# self . assertEqual ( result . name , 'foo.bar.baz' ) #NEWLINE# self . assertEqual ( result . reference , [ 'foo' , 'bar' , 'baz' ] ) #NEWLINE# self . assertEqual ( result . args , [ ] ) #NEWLINE# result = compiler . compile ( 'foo(10,20,30)' ) #NEWLINE# self . assertIsInstance ( result , Function ) #NEWLINE# self . assertEqual ( result . args , [ 10 , 20 , 30 ] )