void-packages/srcpkgs/sagemath/patches/trac-34118-update_sympy_to_...

43 lines
1.6 KiB
Diff
Raw Normal View History

commit 5db5d4e56243c609f44afc1f21c112b026f9e1fe
Author: Oscar Benjamin <oscar.j.benjamin@gmail.com>
Date: Mon Jul 11 21:24:01 2022 +0100
Update doctests for SymPy 1.11
Doctests related to SymPy's rsolve function are updated in:
src/sage/calculus/test_sympy.py
src/sage/tests/books/computational-mathematics-with-sagemath/recequadiff_doctest.py
The form of the output from SymPy has changed since
https://github.com/sympy/sympy/pull/23567
diff --git a/src/sage/calculus/test_sympy.py b/src/sage/calculus/test_sympy.py
index 7cf7f3f6bfd..927e6ee4fb6 100644
--- a/src/sage/calculus/test_sympy.py
+++ b/src/sage/calculus/test_sympy.py
@@ -193,7 +193,7 @@ This was fixed in Sympy, see :trac:`14437`::
sage: u = Function('u')
sage: n = Symbol('n', integer=True)
sage: f = u(n+2) - u(n+1) + u(n)/4
- sage: 2**n * rsolve(f,u(n))
- C1*n + C0
+ sage: expand(2**n * rsolve(f,u(n)))
+ 2*C1*n + C0
"""
diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/recequadiff_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/recequadiff_doctest.py
index 1062f4f7e8c..f53f813d793 100644
--- a/src/sage/tests/books/computational-mathematics-with-sagemath/recequadiff_doctest.py
+++ b/src/sage/tests/books/computational-mathematics-with-sagemath/recequadiff_doctest.py
@@ -382,7 +382,7 @@ Sage example in ./recequadiff.tex, line 1798::
sage: from sympy import rsolve_hyper
sage: from sympy.abc import n
sage: rsolve_hyper([-2,1],2**(n+2),n)
- 2**n*C0 + 2**(n + 2)*(C0 + n/2)
+ 2**n*C0 + 2**(n + 1)*n
"""