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