def testGSeries_CheckCorrectResult2(self): result = problem_4.generateSeries(5) self.assertEqual(result, [0,1,1,2,3], \ msg = "This should generate the list [0,1,1] ")
def testGSeries_NotInteger(self): result = problem_4.generateSeries("A") self.assertEqual(result, 'Not an Integer', \ msg = "This should return an empty list")
def testGSeries_NotLessThanOne2(self): result = problem_4.generateSeries(-1) self.assertEqual(result, 'The number provided must be an integer geater than 1', \ msg = "This should return an error string since -1 is less than 1")
def testPositiveFibonancciTen(self): self.assertEqual(problem_4.generateSeries(10), [0,1,1,2,3,5,8,13,21,34,55], msg="fibonancci should return [0,1,1,2,3,5,8,13,21,34,55]")
def testNegativeFibonancci(self): self.assertEqual(problem_4.generateSeries(-9), -1, msg="Fibonancci should return false for a negative number")
def testAlphabeticalInput(self): self.assertEqual(problem_4.generateSeries('etuyuh'), -1, msg="Fibonancci should return false for a alphabetical letters") '''This section handles the test for the Function generateSeriesSum'''
def testPositiveFibonancci(self): self.assertEqual(problem_4.generateSeries(5), [0,1,1,2,3,5], msg="fibonancci should return [0,1,1,2,3,5]")
def testDecimalInput(self): self.assertEqual(problem_4.generateSeries(4.25), -1, msg="Fibonancci should return false for a decimal")
def testPositiveFibonancciTen(self): self.assertEqual( problem_4.generateSeries(10), [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55], msg="fibonancci should return [0,1,1,2,3,5,8,13,21,34,55]")
def testPositiveFibonancci(self): self.assertEqual(problem_4.generateSeries(5), [0, 1, 1, 2, 3, 5], msg="fibonancci should return [0,1,1,2,3,5]")
def testAlphabeticalInput(self): self.assertEqual( problem_4.generateSeries('etuyuh'), -1, msg="Fibonancci should return false for a alphabetical letters") '''This section handles the test for the Function generateSeriesSum'''
def testNegativeFibonancci(self): self.assertEqual( problem_4.generateSeries(-9), -1, msg="Fibonancci should return false for a negative number")