def test_1(self): x = [1, 2, 3] self.assertAlmostEqual(fold.sum(x), 6)
def test_2(self): x = [0, -2, 3] self.assertAlmostEqual(fold.sum(x), 1)
def test_sum_2(self): l = [-1.0, 0.0, 1.0, 2.0] self.assertAlmostEqual(fold.sum(l), 2.0)
def test_sum_1(self): l = [0.0, 1.0, 2.0, 3.0] self.assertAlmostEqual(fold.sum(l), 6.0)
def test_sum_1(self): list = [1.0, 2.0, 3.0, 4.0, 5.0] self.assertAlmostEqual(fold.sum(list), 15.0)
def test_sum_2(self): list = [6.0, 9.0, 4.0, 2.0, 0.0] self.assertAlmostEqual(fold.sum(list), 21.0)
def test_1(self): l1 = [1, 2, 3, 4, 5] self.assertEqual(fold.sum(l1), 15) l2 = [10, 15, 20, 30, 40, 50] self.assertEqual(fold.sum(l2), 165)
def test_sum_2(self): old_list = [1,2,3,4] self.assertEqual(fold.sum(old_list), 10)
def test_sum_1(self): old_list = [1,1,1,1] self.assertEqual(fold.sum(old_list), 4)