Skip to content

Commit

Permalink
Merge pull request #435 from tornaria/test-optional-mpmath
Browse files Browse the repository at this point in the history
Skip mpmath test if module not available
  • Loading branch information
casevh authored Oct 3, 2023
2 parents 0436f5a + 8e4bb7c commit 355245a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/test_mpfr.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import pytest
from hypothesis import given, example, settings
from hypothesis.strategies import floats
import mpmath

import gmpy2
from gmpy2 import (gamma_inc, mpfr, cmp, cmp_abs, zero, nan, mpz, mpq,
Expand Down Expand Up @@ -123,6 +122,7 @@ def test_mpfr_nrandom():


def test_mpfr_mpmath():
mpmath = pytest.importorskip("mpmath")
a, b, c, d = '1.1', '-1.1', '-3.14', '0'
assert mpfr(a)._mpf_ == (0, mpz(4953959590107546), -52, 53)
assert mpmath.mpf(mpfr(a)) == mpmath.mpf(a)
Expand Down

0 comments on commit 355245a

Please sign in to comment.