MCPcopy
hub / github.com/keon/algorithms / test_priority_queue

Method test_priority_queue

tests/test_queue.py:100–107  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

98 """Test suite for the PriorityQueue data structures."""
99
100 def test_priority_queue(self):
101 queue = PriorityQueue([3, 4, 1, 6])
102 self.assertEqual(4, queue.size())
103 self.assertEqual(1, queue.pop())
104 self.assertEqual(3, queue.size())
105 queue.push(2)
106 self.assertEqual(4, queue.size())
107 self.assertEqual(2, queue.pop())
108
109
110if __name__ == "__main__":

Callers

nothing calls this directly

Calls 4

sizeMethod · 0.95
popMethod · 0.95
pushMethod · 0.95
PriorityQueueClass · 0.90

Tested by

no test coverage detected