Esempio n. 1
0
    def test_heapsort(self):
        for j in range(NUM_TESTS):
            l = rand_list(max_list=MAX_LIST)

            # no return!
            heapsort(l)
            assert_sorted(self, l)
Esempio n. 2
0
    def test_quicksort(self):
        for j in range(NUM_TESTS):
            l = rand_list(max_list=MAX_LIST)

            # no return!
            quicksort(l, prnt=False)
            assert_sorted(self, l)
Esempio n. 3
0
    def test_quicksort(self):
        for j in range(NUM_TESTS):
            l = rand_list(max_list=MAX_LIST)

            # no return!
            quicksort(l, prnt=False)
            assert_sorted(self, l)
 def test_bubble(self):
     for j in range(NUM_TESTS):
         l = rand_list(max_list=MAX_LIST)
         l2 = bubble_sort(l)
         assert_sorted(self, l2)
Esempio n. 5
0
 def test_bubble(self):
     for j in range(NUM_TESTS):
         l = rand_list(max_list=MAX_LIST)
         l2 = bubble_sort(l)
         assert_sorted(self, l2)