def test_maxHeapAdd_BiggestElement_BecomesRoot(self): arr = [0, 4, 3, 2, 1] dac.maxHeapAdd(arr, 17) root = arr[1] self.assertEqual(17, root)
def test_maxHeapAdd_Empty_SetsAsRoot(self): arr = [0] expected = [0, 1] dac.maxHeapAdd(arr, 1) self.assertEqual(expected, arr)