Speedup coverage tests (run less without gmpy2)
This commit is contained in:
@@ -24,12 +24,15 @@ jobs:
|
||||
pip uninstall -y ipython
|
||||
pytest mpmath/tests/test_cli.py
|
||||
pip uninstall -y gmpy2
|
||||
pytest
|
||||
pytest mpmath/tests/test_basic_ops.py mpmath/tests/test_convert.py \
|
||||
mpmath/tests/test_functions.py mpmath/tests/test_gammazeta.py \
|
||||
mpmath/tests/test_bitwise.py
|
||||
- name: Generate coverage reports
|
||||
run: |
|
||||
coverage xml
|
||||
coverage html
|
||||
diff-cover coverage.xml --fail-under=100 --compare-branch=origin/master
|
||||
diff-cover coverage.xml --fail-under=100 \
|
||||
--compare-branch=origin/master
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: coverage
|
||||
|
||||
@@ -11,10 +11,10 @@ import mpmath
|
||||
from mpmath import (ceil, fadd, fdiv, floor, fmul, fneg, fp, frac, fsub, inf,
|
||||
isinf, isint, isnan, isnormal, iv, monitor, mp, mpc, mpf,
|
||||
mpi, nan, ninf, nint, nint_distance, nstr, pi, workprec)
|
||||
from mpmath.libmp import (MPQ, finf, fnan, fninf, fnone, fone, from_float,
|
||||
from_int, from_pickable, from_str, mpf_add, mpf_mul,
|
||||
mpf_sub, round_down, round_nearest, round_up, to_int,
|
||||
to_man_exp, to_pickable)
|
||||
from mpmath.libmp import (MPQ, MPZ, finf, fnan, fninf, fnone, fone, from_float,
|
||||
from_int, from_pickable, from_str, isprime, mpf_add,
|
||||
mpf_mul, mpf_sub, round_down, round_nearest,
|
||||
round_up, to_int, to_man_exp, to_pickable)
|
||||
|
||||
|
||||
def test_type_compare():
|
||||
@@ -539,6 +539,11 @@ def test_isnan_etc():
|
||||
assert mp.isnpint(inf) is False
|
||||
|
||||
|
||||
def test_isprime():
|
||||
assert isprime(MPZ(2))
|
||||
assert not isprime(MPZ(4))
|
||||
|
||||
|
||||
def test_issue_438():
|
||||
assert mpf(finf) == mpf('inf')
|
||||
assert mpf(fninf) == mpf('-inf')
|
||||
|
||||
@@ -6,7 +6,7 @@ from mpmath import (altzeta, apery, barnesg, bell, bernfrac, bernoulli,
|
||||
fraction, gamma, gammaprod, harmonic, hyperfac, inf, isnan,
|
||||
j, log, loggamma, mp, mpc, mpf, mpmathify, nan, pi,
|
||||
polyexp, polylog, primezeta, psi, rf, rgamma, sech,
|
||||
siegelz, sinc, sqrt, stieltjes, superfac, zeta)
|
||||
secondzeta, siegelz, sinc, sqrt, stieltjes, superfac, zeta)
|
||||
from mpmath.libmp import from_float, mpf_zeta_int, round_up
|
||||
|
||||
|
||||
@@ -631,6 +631,9 @@ def test_primezeta():
|
||||
assert primezeta(inf) == 0
|
||||
assert isnan(primezeta(nan))
|
||||
|
||||
def test_secondzeta():
|
||||
assert secondzeta(2, 0.6).ae(0.022849870007492626)
|
||||
|
||||
def test_rs_zeta():
|
||||
assert zeta(0.5+100000j).ae(1.0730320148577531321 + 5.7808485443635039843j)
|
||||
assert zeta(0.75+100000j).ae(1.837852337251873704 + 1.9988492668661145358j)
|
||||
|
||||
Reference in New Issue
Block a user