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

Method test_insert

tests/test_heap.py:20–25  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

18 self.min_heap.insert(87)
19
20 def test_insert(self):
21 # Before insert 2: [0, 4, 50, 7, 55, 90, 87]
22 # After insert: [0, 2, 50, 4, 55, 90, 87, 7]
23 self.min_heap.insert(2)
24 self.assertEqual([0, 2, 50, 4, 55, 90, 87, 7], self.min_heap.heap)
25 self.assertEqual(7, self.min_heap.current_size)
26
27 def test_remove_min(self):
28 ret = self.min_heap.remove_min()

Callers

nothing calls this directly

Calls 1

insertMethod · 0.45

Tested by

no test coverage detected