def test_update_finalized(self): annotations = Annotations(merge_method=add, finalized=False, condition=if_existing) annotations.update(Annotations(finalized=True)) assert add == annotations.merge_method assert annotations.finalized assert if_existing == annotations.condition
def test_update_condition(self): annotations = Annotations(merge_method=add, finalized=False, condition=if_existing) annotations.update(Annotations(condition=always)) assert add == annotations.merge_method assert not annotations.finalized assert always == annotations.condition
def test_update_merge_method(self): annotations = Annotations(merge_method=add, finalized=True, condition=if_existing) annotations.update(Annotations(merge_method=overwrite)) assert overwrite == annotations.merge_method assert annotations.finalized assert if_existing == annotations.condition