def test_function_objects(): print "test_function_objects" val = 1 o = MyClass(val) l = [1, 2, 3, 4] dic = {'key1':'value1', 'key2':'value2'} tup = ('a', 'b', 'c') cplx = complex('1+2j') function_objects(o, l, dic, tup, cplx, par_func) function_objects(o, l, dic, tup, cplx, par_func)
def test_mp_object_access(): print "test_object_mp_access" val = 1 o = MyClass(val) l = [1, 2, 3, 4] dic = {'key1':'value1', 'key2':'value2'} tup = ('a', 'b', 'c') cplx = complex('1+2j') function_objects(o, l, dic, tup, cplx, par_func) o = compss_wait_on(o) if (o.field == val * 2): print "- Object access from MP: OK" else: print "- Object access from MP: ERROR" o.field = val * 4 function_objects(o, l, dic, tup, cplx, par_func)