def test_sorting_algorithm(self): f = new_sorting_algorithm() assert sorted(xs()) == f(xs())
def test_sorting_algorithm(self): f = new_bubble_sort() assert sorted(xs()) == f(xs()) decreasing_xs = [999, 10, 9, 8, 7, 6] assert sorted(copy.copy(decreasing_xs)) == f(decreasing_xs)