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)
def test_instance_method(): print "test_instance_method" val = 1 o = MyClass(val) o.instance_method() o.instance_method_nonmodifier() o.instance_method() o = compss_wait_on(o) if (o.field == val * 4): print "- Object access from MP: OK" else: print "- Object access from MP: ERROR"
def test_class_method(): print "test_class_method" MyClass.class_method()