Esempio n. 1
0
 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")
Esempio n. 2
0
 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")
Esempio n. 3
0
 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")