Closed yurivict closed 1 year ago
How you run tests?
pytest
is run from the repository root.
There is only initial support for pytest, see #377. You should invoke instead test/runtests.py (see GA workflows), e.g.:
$ python test/runtests.py
Unit tests for gmpy2 2.2.0 with Python 3.11.1+
Mutliple-precision library: GMP 6.2.1
Floating-point library: MPFR 4.1.0
Complex library: MPC 1.3.1
Results for: test_context Attempted: 38 Failed: 0
Results for: test_gmpy2_abs Attempted: 83 Failed: 0
Results for: test_gmpy2_add Attempted: 82 Failed: 0
Results for: test_gmpy2_binary Attempted: 106 Failed: 0
Results for: test_gmpy2_cmp Attempted: 41 Failed: 0
Results for: test_gmpy2_comp Attempted: 89 Failed: 0
Results for: test_gmpy2_const Attempted: 33 Failed: 0
Results for: test_gmpy2_constructors Attempted: 34 Failed: 0
Results for: test_gmpy2_convert Attempted: 50 Failed: 0
Results for: test_gmpy2_divmod Attempted: 48 Failed: 0
Results for: test_gmpy2_floordiv Attempted: 72 Failed: 0
Results for: test_gmpy2_format Attempted: 102 Failed: 0
Results for: test_gmpy2_fused Attempted: 18 Failed: 0
Results for: test_gmpy2_lucas Attempted: 23 Failed: 0
Results for: test_gmpy2_math Attempted: 147 Failed: 0
Results for: test_gmpy2_minus Attempted: 16 Failed: 0
Results for: test_gmpy2_mpfr_misc Attempted: 85 Failed: 0
Results for: test_gmpy2_mpq_misc Attempted: 38 Failed: 0
Results for: test_gmpy2_mpq_misc_py3 Attempted: 3 Failed: 0
Results for: test_gmpy2_mpz_bitops Attempted: 120 Failed: 0
Results for: test_gmpy2_mpz_divmod Attempted: 67 Failed: 0
Results for: test_gmpy2_mpz_divmod2exp Attempted: 66 Failed: 0
Results for: test_gmpy2_mpz_inplace Attempted: 87 Failed: 0
Results for: test_gmpy2_mpz_misc Attempted: 252 Failed: 0
Results for: test_gmpy2_mpz_misc_py3 Attempted: 19 Failed: 0
Results for: test_gmpy2_mul Attempted: 68 Failed: 0
Results for: test_gmpy2_muldiv_2exp Attempted: 24 Failed: 0
Results for: test_gmpy2_plus Attempted: 16 Failed: 0
Results for: test_gmpy2_pow Attempted: 62 Failed: 0
Results for: test_gmpy2_predicate Attempted: 124 Failed: 0
Results for: test_gmpy2_prp Attempted: 57 Failed: 0
Results for: test_gmpy2_root Attempted: 23 Failed: 0
Results for: test_gmpy2_square Attempted: 20 Failed: 0
Results for: test_gmpy2_sub Attempted: 83 Failed: 0
Results for: test_gmpy2_xmpz_inplace Attempted: 79 Failed: 0
Results for: test_gmpy2_xmpz_limbs Attempted: 21 Failed: 0
Results for: test_gmpy2_xmpz_misc Attempted: 59 Failed: 0
Results for: test_misc Attempted: 10 Failed: 0
Results for: test_mpc Attempted: 133 Failed: 0
Results for: test_mpc_create Attempted: 7 Failed: 0
Results for: test_mpc_trig Attempted: 21 Failed: 0
Results for: test_mpfr Attempted: 228 Failed: 0
Results for: test_mpfr4_fused Attempted: 15 Failed: 0
Results for: test_mpfr4_random Attempted: 7 Failed: 0
Results for: test_mpfr_create Attempted: 73 Failed: 0
Results for: test_mpfr_min_max Attempted: 26 Failed: 0
Results for: test_mpfr_subnormalize Attempted: 17 Failed: 0
Results for: test_mpfr_trig Attempted: 140 Failed: 0
Results for: test_mpq Attempted: 203 Failed: 0
Results for: test_mpz Attempted: 249 Failed: 0
Results for: test_mpz_create Attempted: 63 Failed: 0
Results for: test_mpz_io Attempted: 60 Failed: 0
Results for: test_mpz_pack_unpack Attempted: 22 Failed: 0
Results for: test_py32_hash Attempted: 17 Failed: 0
Summary - Attempted: 3646 Failed: 0
Running external test programs.
===================================================================== test session starts =====================================================================
platform linux -- Python 3.11.1+, pytest-7.2.1, pluggy-1.0.0
rootdir: /home/sk/src/gmpy, configfile: pyproject.toml
plugins: hypothesis-6.66.1
collected 15 items
test/test_mpfr.py . [ 6%]
test/test_mpq.py ..... [ 40%]
test/test_mpz.py ......... [100%]
==================================================================== slowest 10 durations =====================================================================
7.03s call test/test_mpz.py::test_mpz_from_bytes
5.31s call test/test_mpz.py::test_mpz_to_bytes
4.99s call test/test_mpz.py::test_mpz_arithmetics
4.64s call test/test_mpz.py::test_mpz_pack_unpack
0.04s call test/test_mpq.py::test_mpq_pickling
(5 durations < 0.005s hidden. Use -vv to show these durations.)
===================================================================== 15 passed in 23.96s =====================================================================
Running pytest successful
Lets me know if you will have troubles on this way. If not, probably there is no issue.
This works, thanks!
Version: 2.1.5 Python-3.9 FreeBSD 13.1