Пример #1
0
 def test_generate_eleven(self):
     """Generate the palindrome number: eleven.
     Correctly increment length of palindrome numbers"""
     palindromes = DoubleBasePalindrome(max_number=11)
     eleven = 0
     for x in palindromes.palindrome_numbers_generator():
         eleven = x
     self.assertEqual(11, eleven)
Пример #2
0
 def test_generate_zero(self):
     """Generate the palindrome number: zero.
     This is a corner case for the algorithm"""
     palindromes = DoubleBasePalindrome(max_number=0)
     zero = next(palindromes.palindrome_numbers_generator())
     self.assertEqual(0, zero)