def test_can_insert_features_at_front(self): index = PriorityIndex(["alice", "bob", "carol"]) index.insert("eve", 1) assert_feature_priorities(index, "eve", "alice", "bob", "carol")
def test_can_insert_features_in_middle(self): index = PriorityIndex(["alice", "bob", "carol"]) index.insert("eve", 4) assert_feature_priorities(index, "alice", "bob", "carol", "eve")
def test_limits_priorities_to_lowest_priority_on_insert(self): index = PriorityIndex(["alice", "bob", "carol"]) index.insert("eve", 5) assert_feature_priorities(index, "alice", "bob", "carol", "eve")