def test_function_user(): '''Call the sinus function via a user defined function''' code = ''' function MYSIN, arg return, sin(arg) end ''' with GDLFile(code) as name: assert GDL.function(name, 1.0) == math.sin(1.0)
def test_function_arg_pass_return(arg): '''Call a function that just returns its argument, with different data types''' code = ''' function ARG_PASS_RETURN, arg return, arg end ''' with GDLFile(code) as name: assert numpy.all(GDL.function(name, arg) == arg)
def test_function_arg_pass_return(arg): '''Call a function that just returns its argument, with different data types''' code = ''' function ARG_PASS_RETURN, arg return, arg end ''' with GDLFile(code) as name: assert numpy.all(GDL.function(name, arg) == arg)
def test_function_user(): '''Call the sinus function via a user defined function''' code = ''' function MYSIN, arg return, sin(arg) end ''' with GDLFile(code) as name: assert GDL.function(name, 1.0) == math.sin(1.0)
def test_function_internal(): '''Call the internal sin() function''' assert GDL.function('sin', 1.0) == math.sin(1.0)
def test_function_internal(): '''Call the internal sin() function''' assert GDL.function('sin', 1.0) == math.sin(1.0)