Ejemplo n.º 1
0
 def test_empty_array(self):
     self.assertEqual(sortIS([]), [])
Ejemplo n.º 2
0
 def test_one_value_array(self):
     self.assertEqual(sortIS([2]), [2])
Ejemplo n.º 3
0
 def test_different_type_None(self):
     with self.assertRaises(TypeError):
         sortIS(None)
Ejemplo n.º 4
0
 def test_different_type_number(self):
     with self.assertRaises(TypeError):
         sortIS(3)
Ejemplo n.º 5
0
 def test_different_type_string(self):
     with self.assertRaises(TypeError):
         sortIS("string")
Ejemplo n.º 6
0
 def test_sort2(self):
     self.assertEqual(sortIS([2, -1]), [-1, 2])
Ejemplo n.º 7
0
 def test_sort1(self):
     self.assertEqual(sortIS([4, 0, 3, 1, -1, 2]), [-1, 0, 1, 2, 3, 4])