예제 #1
0
 def test_math_sum(self):
     self.assertEqual(Math.sum([4, 5, None, 3]), 12)
     self.assertEqual(Math.sum([None]), 0)
     self.assertEqual(Math.sum([3.5, 4]), 7.5)
예제 #2
0
 def test_sum_single_value(self):
     data = [10]
     actual = Math.sum(data)
     self.assertEqual(data[0], actual)
예제 #3
0
 def test_sum_multi_value_with_null(self):
     data = [10, 20, None, 30, 40, 50]
     actual = Math.sum(data)
     self.assertEqual(150, actual)
예제 #4
0
 def test_math_sum(self):
     self.assertEqual(Math.sum([4, 5, None, 3]), 12)
     self.assertEqual(Math.sum([None]), 0)
     self.assertEqual(Math.sum([3.5, 4]), 7.5)