Пример #1
0
 def test_tuple(self):
     with self.assertRaises(TypeError):
         find_max_profit((
             7,
             1,
             5,
             3,
             6,
             4,
         ))
Пример #2
0
 def test_return(self):
     self.assertIsInstance(find_max_profit([]), int)
Пример #3
0
 def test_float_inlist(self):
     with self.assertRaises(TypeError):
         find_max_profit([7, 1, 5, 3, 6, 4.5])
Пример #4
0
 def test_float(self):
     with self.assertRaises(TypeError):
         find_max_profit(7.5)
Пример #5
0
 def test_str(self):
     with self.assertRaises(TypeError):
         find_max_profit("7,1,5,3,6,4")
Пример #6
0
 def test_exemplo2(self):
     self.assertEqual(find_max_profit([7, 6, 4, 3, 1]), 0)
Пример #7
0
 def test_exemplo1(self):
     self.assertEqual(find_max_profit([7, 1, 5, 3, 6, 4]), 5)