Пример #1
0
 def testDeleteObject1(self):
     obj_1 = [0]
     obj_2 = increment_object(obj_1)
     obj_2 = compss_wait_on(obj_2)
     obj_1_id = OT.get_object_id(obj_1)
     deletion_result = compss_delete_object(obj_1)
     self.assertTrue(deletion_result)
     self.assertFalse(obj_1_id in OT.pending_to_synchronize)
     self.assertTrue(OT.get_object_id(obj_1) is "")
Пример #2
0
def testInDeleteObject4():
    obj_1 = MyClass2()
    obj_2 = modify_obj(obj_1)
    obj_2 = compss_wait_on(obj_2)
    obj_1_id = OT.get_object_id(obj_1)
    if not (obj_1_id
            in OT.pending_to_synchronize) and OT.get_object_id(obj_1) == "":
        print("- Test 4 IN_DELETE object: OK")
    else:
        print("- Test 4 IN_DELETE object: ERROR")
Пример #3
0
def testInDeleteObject():
    obj_1 = [0]
    obj_2 = increment_object_delete(obj_1)
    obj_2 = compss_wait_on(obj_2)
    obj_1_id = OT.get_object_id(obj_1)
    if not (obj_1_id
            in OT.pending_to_synchronize) and OT.get_object_id(obj_1) == "":
        print("- Test 1 IN_DELETE object: OK")
    else:
        print("- Test 1 IN_DELETE object: ERROR")
Пример #4
0
def testInDeleteObject2():
    obj_1 = [0]
    count = 0
    for i in range(10):
        obj_1[0] = i - 1
        obj_2 = increment_object_delete(obj_1)
        obj_2 = compss_wait_on(obj_2)
        obj_1_id = OT.get_object_id(obj_1)
        if not (obj_1_id in OT.pending_to_synchronize) and OT.get_object_id(
                obj_1) == "" and i == obj_2[0]:
            count += 1
    if count == 10:
        print("- Test 2 IN_DELETE object: OK")
    else:
        print("- Test 2 IN_DELETE object: ERROR")