diff --git a/docs/conf.py b/docs/conf.py index e75cf42e..06007088 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -41,7 +41,7 @@ templates_path = ['_templates'] # General information about the project. -project = 'gmpy2' +project = gmpy2.__package__ copyright = '2012 - 2022, Case Van Horsen' gmpy2_version = packaging.version.parse(gmpy2.__version__) @@ -79,3 +79,11 @@ ('index', 'gmpy2', 'gmpy2 Documentation', ['Case Van Horsen'], 3) ] + +# Python code that is treated like it were put in a testcleanup directive +# for *every* file that is tested, and for every group. +doctest_global_cleanup = """ +import gmpy2 + +gmpy2.set_context(gmpy2.context()) +""" diff --git a/src/gmpy2_mpz_misc.c b/src/gmpy2_mpz_misc.c index 7dfdafde..7bc801e0 100644 --- a/src/gmpy2_mpz_misc.c +++ b/src/gmpy2_mpz_misc.c @@ -1307,7 +1307,7 @@ GMPy_MPZ_Method_IsPower(PyObject *self, PyObject *other) PyDoc_STRVAR(GMPy_doc_mpz_function_is_prime, "is_prime(x, n=25, /) -> bool\n\n" -"Return `True` if x is _probably_ prime, else `False` if x is\n" +"Return `True` if x is *probably* prime, else `False` if x is\n" "definitely composite. x is checked for small divisors and up\n" "to n Miller-Rabin tests are performed."); @@ -1357,7 +1357,7 @@ GMPy_MPZ_Function_IsPrime(PyObject *self, PyObject *args) PyDoc_STRVAR(GMPy_doc_mpz_method_is_prime, "x.is_prime(n=25, /) -> bool\n\n" -"Return `True` if x is _probably_ prime, else `False` if x is\n" +"Return `True` if x is *probably* prime, else `False` if x is\n" "definitely composite. x is checked for small divisors and up\n" "to n Miller-Rabin tests are performed.");