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