aleaxit / gmpy

General Multi-Precision arithmetic for Python 2.6+/3+ (GMP, MPIR, MPFR, MPC)
https://gmpy2.readthedocs.io/en/latest/
GNU Lesser General Public License v3.0
516 stars 86 forks source link

Skip mpmath test if module not available #435

Closed tornaria closed 1 year ago

tornaria commented 1 year ago

Since gmpy2 is a build dependency for mpmath, this allows testing gmpy2 before mpmath is built.

codecov-commenter commented 1 year ago

Codecov Report

Merging #435 (8e4bb7c) into master (0436f5a) will decrease coverage by 0.06%. The diff coverage is n/a.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

@@            Coverage Diff             @@
##           master     #435      +/-   ##
==========================================
- Coverage   83.63%   83.57%   -0.06%     
==========================================
  Files          49       49              
  Lines       11715    11715              
  Branches     2190     2190              
==========================================
- Hits         9798     9791       -7     
- Misses       1917     1924       +7     

see 1 file with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

casevh commented 1 year ago

Thanks!

skirpichev commented 1 year ago

Since gmpy2 is a build dependency for mpmath

Actually, it's not. You can test the mpmath without gmpy2.

tornaria commented 1 year ago

Since gmpy2 is a build dependency for mpmath

Actually, it's not. You can test the mpmath without gmpy2.

I stand corrected. Neither build or runtime dependency.

However, I believe mpmath should be faster with gmpy2, so we ship mpmath with gmpy2 as a runtime dep. It seems better to build gmpy2 first and skip one test, then build mpmath and test with gmpy2. In any case, this PR allows one to build and test both packages independently of each other.