Example #1
0
 def testStartingNegative(self):
     expected = [-33]
     actual = euler.getIterativeSequence(-33)
     self.assertItemsEqual(expected, actual)
Example #2
0
 def testStartingOnOdd(self):
     expected = [39, 118, 59, 178, 89, 268, 134, 67, 202, 101, 304, 152, 76, 38, 19, 58, 29, 88, 44, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1]
     actual = euler.getIterativeSequence(39)
     self.assertItemsEqual(expected, actual)
Example #3
0
 def testStartingOnZero(self):
     expected = [0]
     actual = euler.getIterativeSequence(0)
     self.assertItemsEqual(expected, actual)
Example #4
0
 def testStartingOnEven(self):
     expected = [50, 25, 76, 38, 19, 58, 29, 88, 44, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1]
     actual = euler.getIterativeSequence(50)
     self.assertItemsEqual(expected, actual)