def test_lucas(self): for prime in self.primes: res = lucas_test(prime) self.assertEqual(res, PROBABLY_PRIME) for composite in self.composites: res = lucas_test(composite) self.assertEqual(res, COMPOSITE) self.assertRaises(ValueError, lucas_test, -1)
def test_lucas(self): for prime in self.primes: res = lucas_test(prime) self.assertEqual(res, PROBABLY_PRIME) for composite in self.composites: res = lucas_test(composite) self.assertEqual(res, COMPOSITE) self.assertRaises(ValueError, lucas_test, -1)
def test_lucas(self): for prime in self.primes: self.assertEqual(lucas_test(prime), PROBABLY_PRIME) for composite in self.composites: self.assertEqual(lucas_test(composite), COMPOSITE)
def test_lucas(self): for prime in self.primes: self.assertEqual(lucas_test(prime), PROBABLY_PRIME) for composite in self.composites: self.assertEqual(lucas_test(composite), COMPOSITE)