예제 #1
0
 def test_limit_works_on_extend(self):
     q = BoundedPriorityQueue(2)
     q.extend([DummyNode(1), DummyNode(1), DummyNode(1)])
     self.assertEqual(len(q), 2)
예제 #2
0
 def test_extend_works(self):
     q = BoundedPriorityQueue()
     q.extend([DummyNode(1), DummyNode(1)])
     self.assertEqual(len(q), 2)