def testSum_IsResultCorrect2(self):
		result = problem_4.calculateSum([3, 4, 5, 1])
		self.assertEqual(result, 13,  \
			msg = "This should return the sum of [3, 4, 5, 1] as 13 ")
	def testSum_IsNotEmptyList(self):
		result = problem_4.calculateSum([])
		self.assertEqual(result, 'The list is empty',  \
			msg = "This should return 'The list is empty' ")
	def testSum_IsResultCorrect(self):
		result = problem_4.calculateSum([3, 4])
		self.assertEqual(result, 7,  \
			msg = "This should return the sum of [3,4] as 7 ")
	def testSum_IsList3(self):
		result = problem_4.calculateSum([0,1,2])
		self.assertEqual(result, 3,  \
			msg = "This should return the sum of the list")
	def testSum_IsListOfDigits(self):
		result = problem_4.calculateSum(["D", 3, 4])
		self.assertEqual(result, 'The list contains a non integer value',  \
			msg = "This should return -1 since D is not a number and cant be summed")
Beispiel #6
0
 def testSum_IsResultCorrect2(self):
     result = problem_4.calculateSum([3, 4, 5, 1])
     self.assertEqual(result, 13,  \
      msg = "This should return the sum of [3, 4, 5, 1] as 13 ")
	def testSum_IsList2(self):
		result = problem_4.calculateSum('aded')
		self.assertEqual(result, 'Not a list',  \
			msg = "This should return the sum of the list")
Beispiel #8
0
 def testSum_IsResultCorrect(self):
     result = problem_4.calculateSum([3, 4])
     self.assertEqual(result, 7,  \
      msg = "This should return the sum of [3,4] as 7 ")
Beispiel #9
0
 def testSum_IsNotEmptyList(self):
     result = problem_4.calculateSum([])
     self.assertEqual(result, 'The list is empty',  \
      msg = "This should return 'The list is empty' ")
Beispiel #10
0
 def testSum_IsListOfDigits(self):
     result = problem_4.calculateSum(["D", 3, 4])
     self.assertEqual(result, 'The list contains a non integer value',  \
      msg = "This should return -1 since D is not a number and cant be summed")
Beispiel #11
0
 def testSum_IsList3(self):
     result = problem_4.calculateSum([0, 1, 2])
     self.assertEqual(result, 3,  \
      msg = "This should return the sum of the list")
Beispiel #12
0
 def testSum_IsList2(self):
     result = problem_4.calculateSum('aded')
     self.assertEqual(result, 'Not a list',  \
      msg = "This should return the sum of the list")