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")
def testDecimalInputSum(self): self.assertEqual(problem_4.generateSeriesSum(4.25), -1, msg="Fibonancci should return false for a decimal")
def testAlphabeticalInputSum(self): self.assertEqual(problem_4.generateSeriesSum('etuyuh'), -1, msg="Fibonancci should return false for a alphabetical letters")
def testNegativeFibonancciSum(self): self.assertEqual( problem_4.generateSeriesSum(-9), -1, msg="Fibonancci should return false for a negative number")
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")
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_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")
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")
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")
def testAlphabeticalInputSum(self): self.assertEqual( problem_4.generateSeriesSum('etuyuh'), -1, msg="Fibonancci should return false for a alphabetical letters")
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")
def testPositiveFibonancciSum(self): self.assertEqual(problem_4.generateSeriesSum(5,None), 12, msg="fibonancci should return 12")
def testPositiveFibonancciSum(self): self.assertEqual(problem_4.generateSeriesSum(5, None), 12, msg="fibonancci should return 12")