diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tests/test_sorts.py b/tests/test_sorts.py new file mode 100644 index 000000000000..bb2753cf2d79 --- /dev/null +++ b/tests/test_sorts.py @@ -0,0 +1,9 @@ +from sorts.heap_sort import heap_sort + + +def test_heap_sort(): + assert heap_sort([]) == [] + assert heap_sort([1]) == [1] + assert heap_sort([5, 2, 5, 1]) == [1, 2, 5, 5] + assert heap_sort([1, 2, 3, 4]) == [1, 2, 3, 4] + assert heap_sort([5, 4, 3, 2, 1]) == [1, 2, 3, 4, 5]