Пример #1
0
 def test_quicksort_single_element(self):
     res = list.quicksort([3])
     self.assertListEqual(res, [3])
Пример #2
0
 def test_quicksort_duplicates(self):
     res = list.quicksort([3, 4, 1, 5, 4, 0, 1])
     self.assertListEqual(res, [0, 1, 1, 3, 4, 4, 5])
Пример #3
0
 def test_quicksort(self):
     res = list.quicksort([3, 4, 1, 5, 0])
     self.assertListEqual(res, [0, 1, 3, 4, 5])
Пример #4
0
 def test_quicksort_single_element(self):
     res = list.quicksort([3])
     self.assertListEqual(res, [3])
Пример #5
0
 def test_quicksort_duplicates(self):
     res = list.quicksort([3, 4, 1, 5, 4, 0, 1])
     self.assertListEqual(res, [0, 1, 1, 3, 4, 4, 5])
Пример #6
0
 def test_quicksort(self):
     res = list.quicksort([3, 4, 1, 5, 0])
     self.assertListEqual(res, [0, 1, 3, 4, 5])