code: def test_isprime():
      s = Sieve()
      s.extend(100000)
      ps = set(s.primerange(2, 100001))
      for n in range(100001):
          # if (n in ps) != isprime(n): print n
          assert (n in ps) == isprime(n)
      assert isprime(179424673)
      assert isprime(20678048681)
      assert isprime(1968188556461)
      assert isprime(2614941710599)
      assert isprime(65635624165761929287)
      assert isprime(1162566711635022452267983)
      assert isprime(77123077103005189615466924501)
      assert isprime(3991617775553178702574451996736229)
      assert isprime(273952953553395851092382714516720001799)
      assert isprime(
          int(
              """
  531137992816767098689588206552468627329593117727031923199444138200403\
  559860852242739162502265229285668889329486246501015346579337652707239\
  409519978766587351943831270835393219031728127"""
          )
      )
  
      # Some Mersenne primes
      assert isprime(2**61 - 1)
      assert isprime(2**89 - 1)
      assert isprime(2**607 - 1)
      # (but not all Mersenne's are primes
      assert not isprime(2**601 - 1)
  
      # pseudoprimes
      # -------------
      # to some small bases
      assert not isprime(2152302898747)
      assert not isprime(3474749660383)
      assert not isprime(341550071728321)
      assert not isprime(3825123056546413051)
      # passes the base set [2, 3, 7, 61, 24251]
      assert not isprime(9188353522314541)
      # large examples
      assert not isprime(877777777777777777777777)
      # conjectured psi_12 given at http://mathworld.wolfram.com/StrongPseudoprime.html
      assert not isprime(318665857834031151167461)
      # conjectured psi_17 given at http://mathworld.wolfram.com/StrongPseudoprime.html
      assert not isprime(564132928021909221014087501701)
      # Arnault's 1993 number; a factor of it is
      # 400958216639499605418306452084546853005188166041132508774506\
      # 204738003217070119624271622319159721973358216316508535816696\
      # 9145233813917169287527980445796800452592031836601
      assert not isprime(
          int(
              """
  803837457453639491257079614341942108138837688287558145837488917522297\
  427376533365218650233616396004545791504202360320876656996676098728404\
  396540823292873879185086916685732826776177102938969773947016708230428\
  687109997439976544144845341155872450633409279022275296229414984230688\
  1685404326457534018329786111298960644845216191652872597534901"""
          )
      )
      # Arnault's 1995 number; can be factored as
      # p1*(313*(p1 - 1) + 1)*(353*(p1 - 1) + 1) where p1 is
      # 296744956686855105501541746429053327307719917998530433509950\
      # 755312768387531717701995942385964281211880336647542183455624\
      # 93168782883
      assert not isprime(
          int(
              """
  288714823805077121267142959713039399197760945927972270092651602419743\
  230379915273311632898314463922594197780311092934965557841894944174093\
  380561511397999942154241693397290542371100275104208013496673175515285\
  922696291677532547504444585610194940420003990443211677661994962953925\
  045269871932907037356403227370127845389912612030924484149472897688540\
  6024976768122077071687938121709811322297802059565867"""
          )
      )
      sieve.extend(3000)
      assert isprime(2819)
      assert not isprime(2931)
      assert not isprime(2.0)
  
file_path: sympy/sympy/ntheory/tests/test_primetest.py
imports: from math import gcd
  from sympy.ntheory.generate import Sieve, sieve
  from sympy.ntheory.primetest import mr, _lucas_extrastrong_params, is_lucas_prp, is_square, is_strong_lucas_prp, is_extra_strong_lucas_prp, proth_test, isprime, is_euler_pseudoprime, is_gaussian_prime, is_fermat_pseudoprime, is_euler_jacobi_pseudoprime, MERSENNE_PRIME_EXPONENTS, _lucas_lehmer_primality_test, is_mersenne_prime
  from sympy.testing.pytest import slow, raises
  from sympy.core.numbers import I
label_desc: Use image node_id 10 for calling a global function with example usage: test_isprime() without return types