Ejemplo n.º 1
0
 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)
Ejemplo n.º 2
0
 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)
Ejemplo n.º 3
0
 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)
Ejemplo n.º 4
0
 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)