Skip to content

Commit 48c6cbd

Browse files
committed
Add pytest for heap_sort
1 parent a71618f commit 48c6cbd

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

tests/test_sorts.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from sorts.heap_sort import heap_sort
2+
3+
def test_heap_sort():
4+
assert heap_sort([]) == []
5+
assert heap_sort([1]) == [1]
6+
assert heap_sort([5,2,5,1]) == [1,2,5,5]
7+
assert heap_sort([1,2,3,4]) == [1,2,3,4]
8+
assert heap_sort([5,4,3,2,1]) == [1,2,3,4,5]

0 commit comments

Comments
 (0)