예제 #1
0
 def test_sorting_algorithm(self):
     f = new_sorting_algorithm()
     assert sorted(xs()) == f(xs())
예제 #2
0
 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)