Beispiel #1
0
 def test_computesum(self):
     self.assertEqual(compute_sum([1, 2, 3, [4, 6]]), 16)
Beispiel #2
0
 def test_input_is_not_list(self):
    self.assertEqual(compute_sum((1, 2, 3)),
                     'Invalid argument type. This should be a list')
Beispiel #3
0
 def test_computesum_with_negative_items(self):
    self.assertEqual(compute_sum([1, -2, -3, [4, 6]]), 6)