def testGSeriesSum_IsResultCorrect6(self):
		result = problem_4.generateSeriesSum(2, 'odd')
		self.assertEqual(result, 2,  \
			msg = "This should return the sum of odd numbers in a fibonacci sequence with 2 elements as 1")
Esempio n. 2
0
	def testDecimalInputSum(self):
		self.assertEqual(problem_4.generateSeriesSum(4.25), -1, msg="Fibonancci should return false for a decimal")
Esempio n. 3
0
	def testAlphabeticalInputSum(self):
		self.assertEqual(problem_4.generateSeriesSum('etuyuh'), -1, msg="Fibonancci should return false for a alphabetical letters")
Esempio n. 4
0
 def testNegativeFibonancciSum(self):
     self.assertEqual(
         problem_4.generateSeriesSum(-9),
         -1,
         msg="Fibonancci should return false for a negative number")
Esempio n. 5
0
	def testNegativeFibonancciSum(self):
		self.assertEqual(problem_4.generateSeriesSum(-9), -1, msg="Fibonancci should return false for a negative number")
	def testGSeriesSum_IsInputCorrect2(self):
		result = problem_4.generateSeriesSum([1,2])
		self.assertEqual(result, 'Not an Integer',  \
			msg = "This should return that the input is not an integer value")
	def testGSeriesSum_IsResultCorrect2(self):
		result = problem_4.generateSeriesSum(1)
		self.assertEqual(result, 'The number provided must be an integer geater than 1',  \
			msg = "This should return an error string since a fibbonnacci sequence must have at least 2 elements")
Esempio n. 8
0
 def testGSeriesSum_IsInputCorrect2(self):
     result = problem_4.generateSeriesSum([1, 2])
     self.assertEqual(result, 'Not an Integer',  \
      msg = "This should return that the input is not an integer value")
Esempio n. 9
0
 def testGSeriesSum_IsResultCorrect(self):
     result = problem_4.generateSeriesSum(3)
     self.assertEqual(result, 2,  \
      msg = "This should return the sum of fibonacci sequence with three elements as 2")
Esempio n. 10
0
 def testGSeriesSum_IsResultCorrect7(self):
     result = problem_4.generateSeriesSum(5, 'all')
     self.assertEqual(result, "This function can only be called with 'odd' or 'even'",  \
      msg = "This should return that function is called with a wrong parameter")
Esempio n. 11
0
 def testGSeriesSum_IsResultCorrect8(self):
     result = problem_4.generateSeriesSum(1, 'all')
     self.assertEqual(result, 'The number provided must be an integer geater than 1',  \
      msg = "This should return that function is called with a wrong parameter")
Esempio n. 12
0
 def testGSeriesSum_IsResultCorrect6(self):
     result = problem_4.generateSeriesSum(2, 'odd')
     self.assertEqual(result, 2,  \
      msg = "This should return the sum of odd numbers in a fibonacci sequence with 2 elements as 1")
Esempio n. 13
0
 def testAlphabeticalInputSum(self):
     self.assertEqual(
         problem_4.generateSeriesSum('etuyuh'),
         -1,
         msg="Fibonancci should return false for a alphabetical letters")
Esempio n. 14
0
 def testDecimalInputSum(self):
     self.assertEqual(problem_4.generateSeriesSum(4.25),
                      -1,
                      msg="Fibonancci should return false for a decimal")
Esempio n. 15
0
	def testGSeriesSum_IsResultCorrect7(self):
		result = problem_4.generateSeriesSum(5, 'all')
		self.assertEqual(result, "This function can only be called with 'odd' or 'even'",  \
			msg = "This should return that function is called with a wrong parameter")
Esempio n. 16
0
 def testGSeriesSum_IsResultCorrect2(self):
     result = problem_4.generateSeriesSum(1)
     self.assertEqual(result, 'The number provided must be an integer geater than 1',  \
      msg = "This should return an error string since a fibbonnacci sequence must have at least 2 elements")
Esempio n. 17
0
	def testGSeriesSum_IsResultCorrect8(self):
		result = problem_4.generateSeriesSum(1, 'all')
		self.assertEqual(result, 'The number provided must be an integer geater than 1',  \
			msg = "This should return that function is called with a wrong parameter")
Esempio n. 18
0
 def testGSeriesSum_IsResultCorrect4(self):
     result = problem_4.generateSeriesSum(3, 'even')
     self.assertEqual(result, 44,  \
      msg = "This should return the sum of even numbers in a fibonacci sequence with 3 elements as 0")
Esempio n. 19
0
	def testGSeriesSum_IsResultCorrect(self):
		result = problem_4.generateSeriesSum(3)
		self.assertEqual(result, 2,  \
			msg = "This should return the sum of fibonacci sequence with three elements as 2")
Esempio n. 20
0
	def testPositiveFibonancciSum(self):
		self.assertEqual(problem_4.generateSeriesSum(5,None), 12, msg="fibonancci should return 12")	
Esempio n. 21
0
	def testGSeriesSum_IsResultCorrect4(self):
		result = problem_4.generateSeriesSum(3, 'even')
		self.assertEqual(result, 44,  \
			msg = "This should return the sum of even numbers in a fibonacci sequence with 3 elements as 0")
Esempio n. 22
0
 def testPositiveFibonancciSum(self):
     self.assertEqual(problem_4.generateSeriesSum(5, None),
                      12,
                      msg="fibonancci should return 12")