Exemplo n.º 1
0
 def test_tuple(self):
     with self.assertRaises(TypeError):
         find_max_profit((
             7,
             1,
             5,
             3,
             6,
             4,
         ))
Exemplo n.º 2
0
 def test_return(self):
     self.assertIsInstance(find_max_profit([]), int)
Exemplo n.º 3
0
 def test_float_inlist(self):
     with self.assertRaises(TypeError):
         find_max_profit([7, 1, 5, 3, 6, 4.5])
Exemplo n.º 4
0
 def test_float(self):
     with self.assertRaises(TypeError):
         find_max_profit(7.5)
Exemplo n.º 5
0
 def test_str(self):
     with self.assertRaises(TypeError):
         find_max_profit("7,1,5,3,6,4")
Exemplo n.º 6
0
 def test_exemplo2(self):
     self.assertEqual(find_max_profit([7, 6, 4, 3, 1]), 0)
Exemplo n.º 7
0
 def test_exemplo1(self):
     self.assertEqual(find_max_profit([7, 1, 5, 3, 6, 4]), 5)