Updates:
Labels: -NeedsReview NeedsBetterPatch
Comment #21 on issue 2110 by Vinzent.Steinberg: failing tests
http://code.google.com/p/sympy/issues/detail?id=2110
I also tried this, it fixes the first failure but introduces new ones:
_____________ sympy/core/tests/test_subs.py:test_subs_commutative
______________
File "/home/one/src/sympy/sympy/core/tests/test_subs.py", line 200, in
test_subs_commutative
assert (a*b*a*b).subs(a*b,K) == K**2
AssertionError
________________________________________________________________________________
____________ sympy/core/tests/test_subs.py:test_subs_noncommutative
____________
File "/home/one/src/sympy/sympy/core/tests/test_subs.py", line 217, in
test_subs_noncommutative
assert (x*y*x*y).subs(x*y,L) == L**2
AssertionError
________________________________________________________________________________
More precisely:
In [1]: var('a b x y', commutative=0)
Out[1]: (a, b, x, y)
In [2]: (a*b*a*b)
Out[2]: a⋅b⋅a⋅b
In [3]: (a*b*a*b).subs(a*b, k)
Out[3]: k⋅a⋅b
In [4]: (k*m*k*m)
Out[4]:
2 2
k ⋅m
In [6]: (k*m*k*m).subs(k*m, n)
Out[6]: k⋅m⋅n
This is nicer to debug than an infinite recursion at least.
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to sympy-iss...@googlegroups.com.
To unsubscribe from this group, send email to
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.