def test_counting_sort_empty(): data = [] expected = [] output = sort.counting_sort(data) assert (output == expected), "Got: {}; Expected: {}".format( output, expected)
def test_counting_sort_unsorted_even(): data = [4, 2, 6, 1] expected = [1, 2, 4, 6] output = sort.counting_sort(data) assert (output == expected), "Got: {}; Expected: {}".format( output, expected)
def test_counting_sort_unsorted_odd(): data = [7, 8, 3, 5, 5] expected = [3, 5, 5, 7, 8] output = sort.counting_sort(data) assert (output == expected), "Got: {}; Expected: {}".format( output, expected)
def test_counting_sort_sorted_odd(): data = [1, 2, 3] expected = [1, 2, 3] output = sort.counting_sort(data) assert (output == expected), "Got: {}; Expected: {}".format( output, expected)