Пример #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)
Пример #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)
Пример #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)
Пример #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)