#NEWLINE# def test_output_arg_f( ) : #NEWLINE# #INDENT# from sympy import sin , cos , Equality #NEWLINE# ( x , y , z ) = symbols ( 'x,y,z' ) #NEWLINE# r = make_routine ( 'foo' , [ Equality ( result , sin ( x ) ) , cos ( x ) ] ) #NEWLINE# c = FCodeGen ( ) #NEWLINE# result = c . write ( [ r ] , 'test' , header = False , empty = False ) #NEWLINE# assert ( result [ 0 ] [ 0 ] == 'test.f90' ) #NEWLINE# assert ( result [ 0 ] [ 1 ] == 'REAL*8 function foo(x, y)\nimplicit none\nREAL*8, intent(in) :: x\nREAL*8, intent(out) :: y\ny = sin(x)\nfoo = cos(x)\nend function\n' )