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