Exemplo n.º 1
0
 def testSameMulti(self):
     list = [5, 5, 5, 1, 1, 1, 10, 10, 10]
     mo3_quickSort(list)
     self.assertEqual(list, [1, 1, 1, 5, 5, 5, 10, 10, 10])
Exemplo n.º 2
0
 def testNormal(self):
     list = [5, 4, 3, 2, 1]
     mo3_quickSort(list)
     self.assertEqual(list, [1, 2, 3, 4, 5])
Exemplo n.º 3
0
 def testSame(self):
     list = [2, 2, 2]
     mo3_quickSort(list)
     self.assertEqual(list, [2, 2, 2])
Exemplo n.º 4
0
 def testEmpty(self):
     list = []
     mo3_quickSort(list)
     self.assertEqual(list, [])
Exemplo n.º 5
0
 def testOne(self):
     list = [1]
     mo3_quickSort(list)
     self.assertEqual(list, [1])
 def test_size(self):
     alist = [54,26,93,17,77,31,44,55,20]
     mo3_quickSort(alist)
     result = len(alist)
     
     self.assertEqual(result, 9)
 def test_sort3(self):
     alist = [22,33,54,26,93,17,77,31,44,55,20]
     mo3_quickSort(alist)
     result = alist
     self.assertEqual(result, [17, 20,22, 26, 31, 33, 44, 54, 55, 77, 93])