def test_extract_root(self): # Arrange h = Heap() h.insert(6) h.insert(5) h.insert(3) h.insert(4) h.insert(2) h.insert(1) # Act root = h.extract_root() # Assert self.assertEqual(1, root) self.assertEqual(2, h._heap[0])