Skip to content

Commit

Permalink
fix heap_sort test case
Browse files Browse the repository at this point in the history
  • Loading branch information
noblehelm committed Oct 17, 2017
1 parent fa5ac29 commit e1a37a6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sort/heap_sort/python/heap_sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ def heapSort(arr):
heapify(arr, i, 0)

def test():
test1 = [12, 11, 13, 5, 6, 7]
test2 = [10,67,2,998,23,56,32,21,91,21,22]
test1 = test3 = [12, 11, 13, 5, 6, 7]
test2 = test4 = [10,67,2,998,23,56,32,21,91,21,22]
heapSort(test1)
heapSort(test2)
print(test1)
print(test2)
assert (sorted(test3) == test1)
assert (sorted(test4) == test2)

if __name__=="__main__":
test()

0 comments on commit e1a37a6

Please sign in to comment.