def test_element_exists(): lww_element_set = LWWElementSet() lww_element_set.add('value1', 1) assert lww_element_set.contains('value1')
def test_remove_bias(): lww_element_set = LWWElementSet(bias='remove') lww_element_set.add('value1', 1) lww_element_set.remove('value1', 1) assert not lww_element_set.contains('value1')
def test_element_added_after_removal(): lww_element_set = LWWElementSet() lww_element_set.remove('value1', 1) lww_element_set.add('value1', 2) assert lww_element_set.contains('value1')
def test_add_bias(): lww_element_set = LWWElementSet() lww_element_set.add('value1', 1) lww_element_set.remove('value1', 1) assert lww_element_set.contains('value1')
def test_element_removed_after_insertion(): lww_element_set = LWWElementSet() lww_element_set.add('value1', 1) lww_element_set.remove('value1', 2) assert not lww_element_set.contains('value1')