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)
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)