def test_limit_works_on_extend(self): q = BoundedPriorityQueue(2) q.extend([DummyNode(1), DummyNode(1), DummyNode(1)]) self.assertEquals(len(q), 2)
def test_extend_works(self): q = BoundedPriorityQueue() q.extend([DummyNode(1), DummyNode(1)]) self.assertEquals(len(q), 2)