Example #1
0
 def test_happy_primes_up_to_500(self):
     happy_primes = [7, 13, 19, 23, 31, 79, 97, 103, 109, 139, 167, 193,
                     239, 263, 293, 313, 331, 367, 379, 383, 397, 409, 487]
     self.assertEqual(solution.happy_primes(range(0, 500)), happy_primes)
Example #2
0
 def test_happy_primes(self):
     self.assertEqual(happy_primes(range(25)), [7, 13, 19, 23])
     self.assertEqual(happy_primes(range(63, 100)), [79, 97])
     self.assertEqual(happy_primes(range(140)), \
         [7, 13, 19, 23, 31, 79, 97, 103, 109, 139])
Example #3
0
 def test_happy_primes_up_to_500(self):
     happy_primes = [
         7, 13, 19, 23, 31, 79, 97, 103, 109, 139, 167, 193, 239, 263, 293,
         313, 331, 367, 379, 383, 397, 409, 487
     ]
     self.assertEqual(solution.happy_primes(range(0, 500)), happy_primes)