Example #1
0
 def test_prev_prime(self):
     self.assertEqual(pyprimes.prev_prime(122949829), 122949823)
     self.assertEqual(pyprimes.prev_prime(961748941), 961748927)
     # self.assertEqual(pyprimes.prev_prime(3), 2)
     self.assertRaises(ValueError, pyprimes.prev_prime, 2)
Example #2
0
 def test_prev_prime_from_3(self):
     # Regression test for the case of prev_prime(3) --> 2.
     for prover in ():
         self.assertEqual(strategic.prev_prime(prover, 3), 2)
     self.assertEqual(pyprimes.prev_prime(3), 2)
Example #3
0
 def test_prev_prime_from_3(self):
     # Regression test for the case of prev_prime(3) --> 2.
     for prover in ():
         self.assertEqual(strategic.prev_prime(prover, 3), 2)
     self.assertEqual(pyprimes.prev_prime(3), 2)
Example #4
0
 def test_prev_prime(self):
     self.assertEqual(pyprimes.prev_prime(122949829), 122949823)
     self.assertEqual(pyprimes.prev_prime(961748941), 961748927)
     # self.assertEqual(pyprimes.prev_prime(3), 2)
     self.assertRaises(ValueError, pyprimes.prev_prime, 2)