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
510 stars 86 forks source link

2.1.5: test suite fails with errors `invalid option: '+SKIP_MPC_LESS_THAN_110'` #420

Closed kloczek closed 1 year ago

kloczek commented 1 year ago

I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.

I'm using gmp 6.2.1 and mpfr 4.2.1. Here is pytest output:

```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-gmpy2-2.1.5-5.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-gmpy2-2.1.5-5.fc35.x86_64/usr/lib/python3.8/site-packages + /usr/bin/pytest -ra -m 'not network' ==================================================================================== test session starts ==================================================================================== platform linux -- Python 3.8.18, pytest-7.4.0, pluggy-1.3.0 rootdir: /home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5 collected 69 items / 2 errors ========================================================================================== ERRORS =========================================================================================== _________________________________________________________________________ ERROR collecting test/test_gmpy2_cmp.txt __________________________________________________________________________ /usr/lib/python3.8/site-packages/_pytest/runner.py:341: in from_call result: Optional[TResult] = func() /usr/lib/python3.8/site-packages/_pytest/runner.py:372: in call = CallInfo.from_call(lambda: list(collector.collect()), "collect") /usr/lib/python3.8/site-packages/_pytest/doctest.py:441: in collect test = parser.get_doctest(text, globs, name, filename, 0) /usr/lib64/python3.8/doctest.py:675: in get_doctest return DocTest(self.get_examples(string, name), globs, /usr/lib64/python3.8/doctest.py:689: in get_examples return [x for x in self.parse(string, name) /usr/lib64/python3.8/doctest.py:651: in parse self._parse_example(m, name, lineno) /usr/lib64/python3.8/doctest.py:732: in _parse_example options = self._find_options(source, name, lineno) /usr/lib64/python3.8/doctest.py:761: in _find_options raise ValueError('line %r of the doctest for %s ' E ValueError: line 67 of the doctest for test_gmpy2_cmp.txt has an invalid option: '+SKIP_MPC_LESS_THAN_110' ____________________________________________________________________________ ERROR collecting test/test_mpc.txt _____________________________________________________________________________ /usr/lib/python3.8/site-packages/_pytest/runner.py:341: in from_call result: Optional[TResult] = func() /usr/lib/python3.8/site-packages/_pytest/runner.py:372: in call = CallInfo.from_call(lambda: list(collector.collect()), "collect") /usr/lib/python3.8/site-packages/_pytest/doctest.py:441: in collect test = parser.get_doctest(text, globs, name, filename, 0) /usr/lib64/python3.8/doctest.py:675: in get_doctest return DocTest(self.get_examples(string, name), globs, /usr/lib64/python3.8/doctest.py:689: in get_examples return [x for x in self.parse(string, name) /usr/lib64/python3.8/doctest.py:651: in parse self._parse_example(m, name, lineno) /usr/lib64/python3.8/doctest.py:732: in _parse_example options = self._find_options(source, name, lineno) /usr/lib64/python3.8/doctest.py:761: in _find_options raise ValueError('line %r of the doctest for %s ' E ValueError: line 259 of the doctest for test_mpc.txt has an invalid option: '+SKIP_MPC_LESS_THAN_110' ================================================================================== short test summary info ================================================================================== ERROR test/test_gmpy2_cmp.txt - ValueError: line 67 of the doctest for test_gmpy2_cmp.txt has an invalid option: '+SKIP_MPC_LESS_THAN_110' ERROR test/test_mpc.txt - ValueError: line 259 of the doctest for test_mpc.txt has an invalid option: '+SKIP_MPC_LESS_THAN_110' !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ===================================================================================== 2 errors in 0.51s ===================================================================================== ```

Here is list of installed modules in build env

```console Package Version ----------------------------- ------- alabaster 0.7.13 Babel 2.12.1 build 0.10.0 charset-normalizer 3.2.0 distro 1.8.0 docutils 0.20.1 exceptiongroup 1.1.3 gpg 1.21.0 idna 3.4 imagesize 1.4.1 importlib-metadata 6.8.0 iniconfig 2.0.0 installer 0.7.0 Jinja2 3.1.2 libcomps 0.1.19 MarkupSafe 2.1.3 packaging 23.1 pkg 0.0.0 pluggy 1.3.0 Pygments 2.16.0 pyproject_hooks 1.0.0 pytest 7.4.0 python-dateutil 2.8.2 pytz 2023.3 requests 2.31.0 setuptools 68.0.0 six 1.16.0 snowballstemmer 2.2.0 Sphinx 7.0.1 sphinxcontrib-applehelp 1.0.4 sphinxcontrib-devhelp 1.0.2 sphinxcontrib-htmlhelp 2.0.3 sphinxcontrib-jsmath 1.0.1 sphinxcontrib-qthelp 1.0.3 sphinxcontrib-serializinghtml 1.1.9 tomli 2.0.1 urllib3 2.0.4 wheel 0.41.1 zipp 3.16.2 ```
kloczek commented 1 year ago

pytest automatically tries to scan test/test_ files. Those .txt files should be renamed to be able use pytest. After pass `test/.py` files as pytest param:

```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-gmpy2-2.1.5-5.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-gmpy2-2.1.5-5.fc35.x86_64/usr/lib/python3.8/site-packages + /usr/bin/pytest -ra -m 'not network' test/gmpy_test.py test/runtests.py test/supportclasses.py test/test_mpz_args.py test/test_pack.py ============================= test session starts ============================== platform linux -- Python 3.8.18, pytest-7.4.0, pluggy-1.3.0 rootdir: /home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5 collected 2 items / 1 error ==================================== ERRORS ==================================== ______________________ ERROR collecting test/runtests.py _______________________ /usr/lib/python3.8/site-packages/_pytest/runner.py:341: in from_call result: Optional[TResult] = func() /usr/lib/python3.8/site-packages/_pytest/runner.py:372: in call = CallInfo.from_call(lambda: list(collector.collect()), "collect") /usr/lib/python3.8/site-packages/_pytest/python.py:536: in collect self._inject_setup_module_fixture() /usr/lib/python3.8/site-packages/_pytest/python.py:550: in _inject_setup_module_fixture self.obj, ("setUpModule", "setup_module") /usr/lib/python3.8/site-packages/_pytest/python.py:315: in obj self._obj = obj = self._getobj() /usr/lib/python3.8/site-packages/_pytest/python.py:533: in _getobj return self._importtestmodule() /usr/lib/python3.8/site-packages/_pytest/python.py:622: in _importtestmodule mod = import_path(self.path, mode=importmode, root=self.config.rootpath) /usr/lib/python3.8/site-packages/_pytest/pathlib.py:565: in import_path importlib.import_module(module_name) /usr/lib64/python3.8/importlib/__init__.py:127: in import_module return _bootstrap._gcd_import(name[level:], package, level) :1014: in _gcd_import ??? :991: in _find_and_load ??? :975: in _find_and_load_unlocked ??? :671: in _load_unlocked ??? /usr/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:178: in exec_module exec(co, module.__dict__) test/runtests.py:161: in sys.exit(1) E SystemExit: 1 ------------------------------- Captured stdout -------------------------------- Unit tests for gmpy2 2.1.5 with Python 3.8.18 Mutliple-precision library: GMP 6.2.1 Floating-point library: MPFR 4.2.1 Complex library: MPC 1.3.1 Caching Values: (Cache size) 100 Caching Values: (Size in limbs) 128 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: 42 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 ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_gmpy2_math.txt", line 35, in test_gmpy2_math.txt Failed example: ctx.sqrt(mpfr(-380.25)) Differences (ndiff with -expected +actual): - mpfr('nan') + mpfr('-nan') ? + ********************************************************************** 1 items had failures: 1 of 147 in test_gmpy2_math.txt ***Test Failed*** 1 failures. Results for: test_gmpy2_math Attempted: 147 Failed: 1 Results for: test_gmpy2_minus Attempted: 14 Failed: 0 ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_gmpy2_mpfr_misc.txt", line 118, in test_gmpy2_mpfr_misc.txt Failed example: nan = gmpy2.nan(); nan Differences (ndiff with -expected +actual): - mpfr('nan') + mpfr('-nan') ? + ********************************************************************** 1 items had failures: 1 of 85 in test_gmpy2_mpfr_misc.txt ***Test Failed*** 1 failures. Results for: test_gmpy2_mpfr_misc Attempted: 85 Failed: 1 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: 115 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: 231 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: 120 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: 19 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: 27 Failed: 0 ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpc.txt", line 102, in test_mpc.txt Failed example: aj / 0 Differences (ndiff with -expected +actual): - mpc('inf+infj') + mpc('inf++infj') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpc.txt", line 151, in test_mpc.txt Failed example: aj - float('nan') Differences (ndiff with -expected +actual): - mpc('nan+2.0j') + mpc('-nan+2.0j') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpc.txt", line 153, in test_mpc.txt Failed example: aj * float('inf') Differences (ndiff with -expected +actual): - mpc('inf+infj') + mpc('inf++infj') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpc.txt", line 157, in test_mpc.txt Failed example: aj * float('nan') Differences (ndiff with -expected +actual): - mpc('nan+nanj') + mpc('nan++nanj') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpc.txt", line 159, in test_mpc.txt Failed example: mpc(0,0) * float('inf') Differences (ndiff with -expected +actual): - mpc('nan+nanj') + mpc('-nan++nanj') ? + + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpc.txt", line 161, in test_mpc.txt Failed example: mpc(0,0) * float('-inf') Differences (ndiff with -expected +actual): - mpc('nan+nanj') + mpc('nan++nanj') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpc.txt", line 163, in test_mpc.txt Failed example: mpc(0,0) * float('nan') Differences (ndiff with -expected +actual): - mpc('nan+nanj') + mpc('nan++nanj') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpc.txt", line 171, in test_mpc.txt Failed example: float('-inf') / aj Differences (ndiff with -expected +actual): - mpc('-inf+infj') + mpc('-inf++infj') ? + ********************************************************************** 1 items had failures: 8 of 132 in test_mpc.txt ***Test Failed*** 8 failures. Results for: test_mpc Attempted: 132 Failed: 8 Results for: test_mpc_create Attempted: 7 Failed: 0 Results for: test_mpc_trig Attempted: 21 Failed: 0 ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpfr.txt", line 145, in test_mpfr.txt Failed example: b / mpc(0, 0) Differences (ndiff with -expected +actual): - mpc('inf+nanj') + mpc('inf++nanj') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpfr.txt", line 147, in test_mpfr.txt Failed example: get_context().div(b, mpc(0, 0)) Differences (ndiff with -expected +actual): - mpc('inf+nanj') + mpc('inf++nanj') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpfr.txt", line 293, in test_mpfr.txt Failed example: a + float('nan') Differences (ndiff with -expected +actual): - mpfr('nan') + mpfr('-nan') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpfr.txt", line 295, in test_mpfr.txt Failed example: float('nan') + a Differences (ndiff with -expected +actual): - mpfr('nan') + mpfr('-nan') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpfr.txt", line 307, in test_mpfr.txt Failed example: float('nan') - a Differences (ndiff with -expected +actual): - mpfr('nan') + mpfr('-nan') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpfr.txt", line 329, in test_mpfr.txt Failed example: mpfr(0) * float('Inf') Differences (ndiff with -expected +actual): - mpfr('nan') + mpfr('-nan') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpfr.txt", line 353, in test_mpfr.txt Failed example: a / float('nan') Differences (ndiff with -expected +actual): - mpfr('nan') + mpfr('-nan') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpfr.txt", line 357, in test_mpfr.txt Failed example: float('nan') / mpfr(0) Differences (ndiff with -expected +actual): - mpfr('nan') + mpfr('-nan') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpfr.txt", line 370, in test_mpfr.txt Failed example: a + mpfr('nan') Differences (ndiff with -expected +actual): - mpfr('nan') + mpfr('-nan') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpfr.txt", line 382, in test_mpfr.txt Failed example: a - mpfr('nan') Differences (ndiff with -expected +actual): - mpfr('nan') + mpfr('-nan') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpfr.txt", line 402, in test_mpfr.txt Failed example: a * mpfr('nan') Differences (ndiff with -expected +actual): - mpfr('nan') + mpfr('-nan') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpfr.txt", line 430, in test_mpfr.txt Failed example: a / mpfr('nan') Differences (ndiff with -expected +actual): - mpfr('nan') + mpfr('-nan') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpfr.txt", line 434, in test_mpfr.txt Failed example: mpfr('nan') / mpfr(0) Differences (ndiff with -expected +actual): - mpfr('nan') + mpfr('-nan') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpfr.txt", line 447, in test_mpfr.txt Failed example: divmod(a, float('nan')) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('nan'), mpfr('-nan')) ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpfr.txt", line 449, in test_mpfr.txt Failed example: divmod(-a, float('nan')) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('-nan'), mpfr('-nan')) ? + + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpfr.txt", line 457, in test_mpfr.txt Failed example: divmod(float('Inf'), a) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('-nan'), mpfr('-nan')) ? + + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpfr.txt", line 461, in test_mpfr.txt Failed example: divmod(float('Inf'), -a) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('-nan'), mpfr('-nan')) ? + + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpfr.txt", line 463, in test_mpfr.txt Failed example: divmod(float('-Inf'), -a) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('-nan'), mpfr('nan')) ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpfr.txt", line 465, in test_mpfr.txt Failed example: divmod(float('nan'), a) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('-nan'), mpfr('-nan')) ? + + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpfr.txt", line 467, in test_mpfr.txt Failed example: divmod(float('nan'), -a) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('-nan'), mpfr('nan')) ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpfr.txt", line 469, in test_mpfr.txt Failed example: divmod(float('Inf'), mpfr(0)) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('-nan'), mpfr('-nan')) ? + + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpfr.txt", line 473, in test_mpfr.txt Failed example: divmod(float('nan'), mpfr(0)) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('nan'), mpfr('-nan')) ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpfr.txt", line 484, in test_mpfr.txt Failed example: divmod(a, mpfr('nan')) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('-nan'), mpfr('nan')) ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpfr.txt", line 486, in test_mpfr.txt Failed example: divmod(-a, mpfr('nan')) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('-nan'), mpfr('nan')) ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpfr.txt", line 492, in test_mpfr.txt Failed example: divmod(mpfr(0), mpfr('nan')) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('-nan'), mpfr('nan')) ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpfr.txt", line 494, in test_mpfr.txt Failed example: divmod(mpfr('Inf'), a) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('nan'), mpfr('-nan')) ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpfr.txt", line 498, in test_mpfr.txt Failed example: divmod(mpfr('Inf'), -a) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('nan'), mpfr('-nan')) ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpfr.txt", line 500, in test_mpfr.txt Failed example: divmod(mpfr('-Inf'), -a) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('-nan'), mpfr('nan')) ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpfr.txt", line 502, in test_mpfr.txt Failed example: divmod(mpfr('nan'), a) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('-nan'), mpfr('-nan')) ? + + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpfr.txt", line 504, in test_mpfr.txt Failed example: divmod(mpfr('nan'), -a) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('-nan'), mpfr('nan')) ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpfr.txt", line 506, in test_mpfr.txt Failed example: divmod(mpfr('Inf'), mpfr(0)) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('-nan'), mpfr('nan')) ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpfr.txt", line 510, in test_mpfr.txt Failed example: divmod(mpfr('nan'), mpfr(0)) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('nan'), mpfr('-nan')) ? + ********************************************************************** 1 items had failures: 32 of 227 in test_mpfr.txt ***Test Failed*** 32 failures. Results for: test_mpfr Attempted: 227 Failed: 32 Results for: test_mpfr4_fused Attempted: 13 Failed: 0 Results for: test_mpfr4_random Attempted: 7 Failed: 0 ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpfr_create.txt", line 47, in test_mpfr_create.txt Failed example: mpfr(float("nan")) Differences (ndiff with -expected +actual): - mpfr('nan') + mpfr('-nan') ? + ********************************************************************** 1 items had failures: 1 of 73 in test_mpfr_create.txt ***Test Failed*** 1 failures. Results for: test_mpfr_create Attempted: 73 Failed: 1 ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpfr_min_max.txt", line 55, in test_mpfr_min_max.txt Failed example: minnum(nan, nan) Differences (ndiff with -expected +actual): - mpfr('nan') + mpfr('-nan') ? + ********************************************************************** 1 items had failures: 1 of 26 in test_mpfr_min_max.txt ***Test Failed*** 1 failures. Results for: test_mpfr_min_max Attempted: 26 Failed: 1 Results for: test_mpfr_subnormalize Attempted: 17 Failed: 0 Results for: test_mpfr_trig Attempted: 140 Failed: 0 ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpq.txt", line 218, in test_mpq.txt Failed example: a + float('nan') Differences (ndiff with -expected +actual): - mpfr('nan') + mpfr('-nan') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpq.txt", line 220, in test_mpq.txt Failed example: float('nan') + a Differences (ndiff with -expected +actual): - mpfr('nan') + mpfr('-nan') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpq.txt", line 232, in test_mpq.txt Failed example: float('nan') - a Differences (ndiff with -expected +actual): - mpfr('nan') + mpfr('-nan') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpq.txt", line 278, in test_mpq.txt Failed example: a / float('nan') Differences (ndiff with -expected +actual): - mpfr('nan') + mpfr('-nan') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpq.txt", line 282, in test_mpq.txt Failed example: float('nan') / G.mpz(0) Differences (ndiff with -expected +actual): - mpfr('nan') + mpfr('-nan') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpq.txt", line 295, in test_mpq.txt Failed example: a + mpfr('nan') Differences (ndiff with -expected +actual): - mpfr('nan') + mpfr('-nan') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpq.txt", line 307, in test_mpq.txt Failed example: a - mpfr('nan') Differences (ndiff with -expected +actual): - mpfr('nan') + mpfr('-nan') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpq.txt", line 327, in test_mpq.txt Failed example: a * mpfr('nan') Differences (ndiff with -expected +actual): - mpfr('nan') + mpfr('-nan') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpq.txt", line 335, in test_mpq.txt Failed example: mpfr('Inf') * G.mpz(0) Differences (ndiff with -expected +actual): - mpfr('nan') + mpfr('-nan') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpq.txt", line 355, in test_mpq.txt Failed example: a / mpfr('nan') Differences (ndiff with -expected +actual): - mpfr('nan') + mpfr('-nan') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpq.txt", line 372, in test_mpq.txt Failed example: divmod(a, float('nan')) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('nan'), mpfr('-nan')) ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpq.txt", line 374, in test_mpq.txt Failed example: divmod(-a, float('nan')) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('-nan'), mpfr('nan')) ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpq.txt", line 382, in test_mpq.txt Failed example: divmod(float('Inf'), a) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('-nan'), mpfr('-nan')) ? + + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpq.txt", line 386, in test_mpq.txt Failed example: divmod(float('Inf'), -a) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('-nan'), mpfr('-nan')) ? + + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpq.txt", line 390, in test_mpq.txt Failed example: divmod(float('nan'), a) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('-nan'), mpfr('-nan')) ? + + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpq.txt", line 394, in test_mpq.txt Failed example: divmod(float('Inf'), G.mpz(0)) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('-nan'), mpfr('-nan')) ? + + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpq.txt", line 398, in test_mpq.txt Failed example: divmod(float('nan'), G.mpz(0)) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('-nan'), mpfr('-nan')) ? + + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpq.txt", line 409, in test_mpq.txt Failed example: divmod(a, mpfr('nan')) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('-nan'), mpfr('nan')) ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpq.txt", line 411, in test_mpq.txt Failed example: divmod(-a, mpfr('nan')) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('nan'), mpfr('-nan')) ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpq.txt", line 417, in test_mpq.txt Failed example: divmod(G.mpz(0), mpfr('nan')) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('-nan'), mpfr('nan')) ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpq.txt", line 419, in test_mpq.txt Failed example: divmod(mpfr('Inf'), a) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('nan'), mpfr('-nan')) ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpq.txt", line 423, in test_mpq.txt Failed example: divmod(mpfr('Inf'), -a) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('-nan'), mpfr('-nan')) ? + + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpq.txt", line 427, in test_mpq.txt Failed example: divmod(mpfr('nan'), a) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('-nan'), mpfr('-nan')) ? + + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpq.txt", line 431, in test_mpq.txt Failed example: divmod(mpfr('Inf'), G.mpz(0)) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('nan'), mpfr('-nan')) ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpq.txt", line 435, in test_mpq.txt Failed example: divmod(mpfr('nan'), G.mpz(0)) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('-nan'), mpfr('-nan')) ? + + ********************************************************************** 1 items had failures: 25 of 207 in test_mpq.txt ***Test Failed*** 25 failures. Results for: test_mpq Attempted: 207 Failed: 25 ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpz.txt", line 316, in test_mpz.txt Failed example: a + float('nan') Differences (ndiff with -expected +actual): - mpfr('nan') + mpfr('-nan') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpz.txt", line 318, in test_mpz.txt Failed example: float('nan') + a Differences (ndiff with -expected +actual): - mpfr('nan') + mpfr('-nan') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpz.txt", line 331, in test_mpz.txt Failed example: float('nan') - a Differences (ndiff with -expected +actual): - mpfr('nan') + mpfr('-nan') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpz.txt", line 378, in test_mpz.txt Failed example: a / float('nan') Differences (ndiff with -expected +actual): - mpfr('nan') + mpfr('-nan') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpz.txt", line 382, in test_mpz.txt Failed example: float('nan') / G.mpz(0) Differences (ndiff with -expected +actual): - mpfr('nan') + mpfr('-nan') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpz.txt", line 395, in test_mpz.txt Failed example: a - mpfr('nan') Differences (ndiff with -expected +actual): - mpfr('nan') + mpfr('-nan') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpz.txt", line 415, in test_mpz.txt Failed example: a * mpfr('nan') Differences (ndiff with -expected +actual): - mpfr('nan') + mpfr('-nan') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpz.txt", line 423, in test_mpz.txt Failed example: mpfr('Inf') * G.mpz(0) Differences (ndiff with -expected +actual): - mpfr('nan') + mpfr('-nan') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpz.txt", line 443, in test_mpz.txt Failed example: a / mpfr('nan') Differences (ndiff with -expected +actual): - mpfr('nan') + mpfr('-nan') ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpz.txt", line 460, in test_mpz.txt Failed example: divmod(a, mpfr('nan')) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('-nan'), mpfr('nan')) ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpz.txt", line 462, in test_mpz.txt Failed example: divmod(-a, mpfr('nan')) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('nan'), mpfr('-nan')) ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpz.txt", line 468, in test_mpz.txt Failed example: divmod(G.mpz(0), mpfr('nan')) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('-nan'), mpfr('nan')) ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpz.txt", line 470, in test_mpz.txt Failed example: divmod(mpfr('Inf'), a) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('nan'), mpfr('-nan')) ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpz.txt", line 474, in test_mpz.txt Failed example: divmod(mpfr('Inf'), -a) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('-nan'), mpfr('-nan')) ? + + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpz.txt", line 478, in test_mpz.txt Failed example: divmod(mpfr('nan'), a) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('-nan'), mpfr('-nan')) ? + + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpz.txt", line 482, in test_mpz.txt Failed example: divmod(mpfr('Inf'), G.mpz(0)) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('nan'), mpfr('-nan')) ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpz.txt", line 486, in test_mpz.txt Failed example: divmod(mpfr('nan'), G.mpz(0)) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('-nan'), mpfr('-nan')) ? + + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpz.txt", line 497, in test_mpz.txt Failed example: divmod(a, mpfr('nan')) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('-nan'), mpfr('nan')) ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpz.txt", line 499, in test_mpz.txt Failed example: divmod(-a, mpfr('nan')) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('nan'), mpfr('-nan')) ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpz.txt", line 505, in test_mpz.txt Failed example: divmod(G.mpz(0), mpfr('nan')) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('-nan'), mpfr('nan')) ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpz.txt", line 507, in test_mpz.txt Failed example: divmod(mpfr('Inf'), a) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('nan'), mpfr('-nan')) ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpz.txt", line 511, in test_mpz.txt Failed example: divmod(mpfr('Inf'), -a) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('-nan'), mpfr('-nan')) ? + + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpz.txt", line 515, in test_mpz.txt Failed example: divmod(mpfr('nan'), a) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('-nan'), mpfr('-nan')) ? + + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpz.txt", line 519, in test_mpz.txt Failed example: divmod(mpfr('Inf'), G.mpz(0)) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('nan'), mpfr('-nan')) ? + ********************************************************************** File "/home/tkloczko/rpmbuild/BUILD/gmpy-gmpy2-2.1.5/test/test_mpz.txt", line 523, in test_mpz.txt Failed example: divmod(mpfr('nan'), G.mpz(0)) Differences (ndiff with -expected +actual): - (mpfr('nan'), mpfr('nan')) + (mpfr('-nan'), mpfr('-nan')) ? + + ********************************************************************** 1 items had failures: 25 of 230 in test_mpz.txt ***Test Failed*** 25 failures. Results for: test_mpz Attempted: 230 Failed: 25 Results for: test_mpz_create Attempted: 58 Failed: 0 Results for: test_mpz_io Attempted: 60 Failed: 0 Results for: test_mpz_pack_unpack Attempted: 16 Failed: 0 Results for: test_py32_hash Attempted: 17 Failed: 0 Summary - Attempted: 3594 Failed: 94 Running external test programs. Running test_pack.py successful Running test_mpz_args.py successful =========================== short test summary info ============================ ERROR test/runtests.py - SystemExit: 1 !!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! =============================== 1 error in 2.41s =============================== ```

Looks like test suite is not ready to be used with pytest 😞

skirpichev commented 1 year ago

run pytest with $PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>

Please run python test/runtests.py instead. The test suite only partially was converted to the pytest framework, see #377. Let us know if you still will be observe test failures.

Looks like test suite is not ready to be used with pytest

Yep.

kloczek commented 1 year ago

Thank you. I've subscribed to that ticket 👍 As in my distribution I'm trying to test everything using pytest I'll keep current test procedure .. even if it temporary/partially fails. As you already mention that moving to pytest is in kind of WIP state for long term reason IMO better will be if I'll stick with pytest even if it fails temporary 😋 Using pytest allows me to perform many additional variants of the tests by install additional pytest extensions in build env.

skirpichev commented 1 year ago

As in my distribution I'm trying to test everything using pytest I'll keep current test procedure .. even if it temporary/partially fails.

Whatever you wish, but if you are unable to reproduce test failures with a correct invocation of the gmpy2 test suite (as described above) - I believe this issue should be closed.

kloczek commented 1 year ago

If you are going to continue migration to pytest under that ticket which you mention I think that you are right. I'm not sure so I'm leaving you decision 😋

skirpichev commented 1 year ago

How do you suggest to fix this issue?

kloczek commented 1 year ago

My understanding is that your intention is to move test suite from custom framework to pytest and that work is in WIP state so fixing this issue may take longer time and/or is not critical as non-pytest based test suite runner is working.

If that is true I was ot aware of that and as work on pytest migration is done under different ticket probably this ticket can be closed. As I've already found that that I was not aware some development details as I wrote I'm leaving you you decision about closing or not this ticket .. only this an nothing more.

skirpichev commented 1 year ago

@casevh, I think this can be closed.

casevh commented 1 year ago

Closing.