Skip to content

ODH: Fix issue of test case failure for sympy pkg#8017

Open
bhagyashrigai wants to merge 3 commits intoppc64le:masterfrom
bhagyashrigai:sympy
Open

ODH: Fix issue of test case failure for sympy pkg#8017
bhagyashrigai wants to merge 3 commits intoppc64le:masterfrom
bhagyashrigai:sympy

Conversation

@bhagyashrigai
Copy link
Contributor

Updated script to fix issue of test failure for sympy

Checklist

  • Have you checked and followed all the points mention in the CONTRIBUTING.MD
  • Have you validated script on UBI 9 container
  • Did you run the script(s) on fresh container with set -e option enabled and observe success ?
  • Did you have Legal approvals for patch files ?

Updated script to fix issue of test failure for sympy
@cdeepali
Copy link
Contributor

@bhagyashrigai could you please capture the warnings which were seen prior to this change for record.

@bhagyashrigai
Copy link
Contributor Author

@bhagyashrigai could you please capture the warnings which were seen prior to this change for record.

=================================== FAILURES ===================================
_________________________ test_integrate_poly_definite _________________________

def test_integrate_poly_definite():
p = Poly(x + x2*y + y3, x, y)

with warns_deprecated_sympy():
Qx = Integral(p, (x, 0, 1))
with warns(SymPyDeprecationWarning, test_stacklevel=False):
Qx = integrate(p, (x, 0, 1))
with warns(SymPyDeprecationWarning, test_stacklevel=False):

      Qy = integrate(p, (y, 0, pi))

test_integrals.py:288:


../integrals.py:1567: in integrate
return integral.doit(**doit_flags)
../integrals.py:499: in doit
did = self.xreplace(reps).doit(**hints)
../integrals.py:678: in doit
function = antideriv._eval_interval(x, a, b)
../../core/expr.py:950: in _eval_interval
if a < b:
../../core/numbers.py:2269: in lt
return Rational.lt(self, other)
../../core/numbers.py:1965: in lt
return Expr.lt(*rv)
../../core/decorators.py:236: in _func
return func(self, other)
../../core/expr.py:376: in lt
return StrictLessThan(self, other)
../../core/relational.py:833: in new
return cls._eval_relation(lhs, rhs, **options)
../../core/relational.py:840: in _eval_relation
val = cls._eval_fuzzy_relation(lhs, rhs)
../../core/relational.py:1167: in _eval_fuzzy_relation
return is_lt(lhs, rhs)
../../core/relational.py:1246: in is_lt
return fuzzy_not(is_ge(lhs, rhs, assumptions))
../../core/relational.py:1368: in is_ge
n2 = _n2(lhs, rhs)
../../core/relational.py:1203: in _n2
dif = (a - b).evalf(2)
../../core/evalf.py:1647: in evalf
result = evalf(self, prec + 4, options)
../../core/evalf.py:1482: in evalf
r = rf(x, prec, options)
../../core/evalf.py:718: in evalf_mul
v = normalize(sign, man, exp, bitcount(man), prec, rnd)
../../core/evalf.py:54: in bitcount
return mpmath_bitcount(abs(int(n)))


n = 1647099

def bitcount(n):
"""Calculate bit size of abs(n)."""

  warnings.warn("bitcount function is deprecated",

DeprecationWarning)
E DeprecationWarning: bitcount function is deprecated

/usr/local/lib/python3.9/site-packages/mpmath/libmp/libintmath.py:75: DeprecationWarning
DO NOT COMMIT!
=========================== short test summary info ============================
FAILED test_integrals.py::test_integrate_poly_definite - DeprecationWarning: ...
= 1 failed, 383 passed, 2 skipped, 38 xfailed, 1 xpassed in 1514.77s (0:25:14) =

@bhagyashrigai
Copy link
Contributor Author

@cdeepali done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants