From 8a5c70630762f022b5aebc0e3938525f5b9f77be Mon Sep 17 00:00:00 2001 From: Sergey B Kirpichev Date: Fri, 3 Apr 2026 04:53:01 +0300 Subject: [PATCH 1/2] Test types, returned by mpmath.libmp.libmpf.* --- tests/test_functions.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_functions.py b/tests/test_functions.py index cceab97e..dc63a7d9 100644 --- a/tests/test_functions.py +++ b/tests/test_functions.py @@ -142,6 +142,7 @@ def test_mpmath_normalize(sign, man, exp, prec, rnd): sign = int(sign) bc = mman.bit_length() res = mpmath.libmp.libmpf._normalize(sign, man, exp, bc, prec, rnd) + assert all(type(_) is int for _ in res) assert _mpmath_normalize(sign, mman, exp, bc, prec, rnd) == res @@ -154,6 +155,7 @@ def test_mpmath_create(man, exp, prec, rnd): mpmath = pytest.importorskip("mpmath") mman = mpz(man) res = mpmath.libmp.from_man_exp(man, exp, prec, rnd) + assert all(type(_) is int for _ in res) assert _mpmath_create(mman, exp, prec, rnd) == res assert mman == man assert _mpmath_create(man, exp, prec, rnd) == res From 9d59a121dd46edb2469561b22b0f892a241fe99a Mon Sep 17 00:00:00 2001 From: Sergey B Kirpichev Date: Fri, 3 Apr 2026 08:54:00 +0300 Subject: [PATCH 2/2] Drop some workaround for oracle/graalpython#534 See #232 --- tests/test_mpz.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/test_mpz.py b/tests/test_mpz.py index 1f490819..03632716 100644 --- a/tests/test_mpz.py +++ b/tests/test_mpz.py @@ -513,8 +513,6 @@ def test_divmod_bulk(x, y): with pytest.raises(ZeroDivisionError): x % my return - if y < 0 and platform.python_implementation() == "GraalVM": - return # issue oracle/graalpython#534 r = x // y assert mx // my == r assert mx // y == r