Ejemplo n.º 1
0
 def test_arreglo_desordenado(self):
     A = [randint(0, 85) for x in range(142)]
     C = A.copy()
     asc = random() < 0.5
     self.assertEqual(Tarea3.CountingSort(A, 85, asc),
                      sorted(C, reverse=not asc))
Ejemplo n.º 2
0
 def test_arreglo_unico(self):
     A = [7 for x in range(1000)]
     C = A.copy()
     asc = random() < 0.5
     self.assertEqual(Tarea3.CountingSort(A, 7, asc),
                      sorted(C, reverse=not asc))
Ejemplo n.º 3
0
 def test_arreglo_vacio(self):
     A = []
     self.assertEqual([], Tarea3.CountingSort(A, 100, False))