示例#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)