Comment #12 on issue 1358 by ondrej.certik: (e*f*e*f).subs(e*f,f*e+h) fails if e*f is not commutative http://code.google.com/p/sympy/issues/detail?id=1358
Thanks! The patch looks good in general, however it fails lots of tests: ============================= test process starts ============================== executable: /usr/bin/python (2.6.2-final-0) sympy/concrete/tests/test_gosper.py[2] .. [OK] sympy/concrete/tests/test_products.py[3] ... [OK] sympy/concrete/tests/test_sums_products.py[13] ....FF...fff. [FAIL] sympy/core/tests/test_arit.py[41] .....ff.................................. [OK] sympy/core/tests/test_assumptions.py[27] ......f.................... [OK] sympy/core/tests/test_basic.py[39] ....................................... [OK] sympy/core/tests/test_cache.py[1] . [OK] sympy/core/tests/test_complex.py[10] .......... [OK] sympy/core/tests/test_count_ops.py[1] . [OK] sympy/core/tests/test_diff.py[5] ..... [OK] sympy/core/tests/test_equal.py[5] ..... [OK] sympy/core/tests/test_eval.py[8] .......f [OK] sympy/core/tests/test_eval_power.py[9] ......... [OK] sympy/core/tests/test_evalf.py[19] ................... [OK] sympy/core/tests/test_facts.py[11] ........... [OK] sympy/core/tests/test_functions.py[26] ............ff............ [OK] sympy/core/tests/test_logic.py[10] .......... [OK] sympy/core/tests/test_match.py[26] ......f................... [OK] sympy/core/tests/test_multidimensional.py[4] .... [OK] sympy/core/tests/test_numbers.py[29] ............................. [OK] sympy/core/tests/test_relational.py[5] ..... [OK] sympy/core/tests/test_subs.py[20] ...............F.... [FAIL] sympy/core/tests/test_symbol.py[5] ..... [OK] sympy/core/tests/test_sympify.py[18] .................. [OK] sympy/core/tests/test_truediv.py[3] ... [OK] sympy/core/tests/test_var.py[4] .... [OK] sympy/functions/combinatorial/tests/test_comb_factorials.py[3] ... [OK] sympy/functions/combinatorial/tests/test_comb_numbers.py[4] ..E. [FAIL] sympy/functions/elementary/tests/test_complexes.py[9] ......... [OK] sympy/functions/elementary/tests/test_exponential.py[9] ......... [OK] sympy/functions/elementary/tests/test_hyperbolic.py[11] ..f........ [OK] sympy/functions/elementary/tests/test_integers.py[3] ..f [OK] sympy/functions/elementary/tests/test_interface.py[3] E.. [FAIL] sympy/functions/elementary/tests/test_miscellaneous.py[2] .. [OK] sympy/functions/elementary/tests/test_piecewise.py[1] . [OK] sympy/functions/elementary/tests/test_trigonometric.py[11] ........... [OK] sympy/functions/special/tests/test_delta_functions.py[2] .. [OK] sympy/functions/special/tests/test_error_functions.py[3] ... [OK] sympy/functions/special/tests/test_gamma_functions.py[6] ...... [OK] sympy/functions/special/tests/test_spec_polynomials.py[4] .... [OK] sympy/functions/special/tests/test_spherical_harmonics.py[5] ..... [OK] sympy/functions/special/tests/test_tensor_functions.py[2] .. [OK] sympy/functions/special/tests/test_zeta_functions.py[2] .. [OK] sympy/galgebra/tests/test_GA.py[9] ......... [OK] sympy/geometry/tests/test_geometry.py[7] ....... [OK] for the beginning, start just with sympy/core tests: $ bin/test sympy/core/ ============================= test process starts ============================== executable: /usr/bin/python (2.6.2-final-0) sympy/core/tests/test_arit.py[41] .....ff.................................. [OK] sympy/core/tests/test_assumptions.py[27] ......f.................... [OK] sympy/core/tests/test_basic.py[39] ....................................... [OK] sympy/core/tests/test_cache.py[1] . [OK] sympy/core/tests/test_complex.py[10] .......... [OK] sympy/core/tests/test_count_ops.py[1] . [OK] sympy/core/tests/test_diff.py[5] ..... [OK] sympy/core/tests/test_equal.py[5] ..... [OK] sympy/core/tests/test_eval.py[8] .......f [OK] sympy/core/tests/test_eval_power.py[9] ......... [OK] sympy/core/tests/test_evalf.py[19] ................... [OK] sympy/core/tests/test_facts.py[11] ........... [OK] sympy/core/tests/test_functions.py[26] ............ff............ [OK] sympy/core/tests/test_logic.py[10] .......... [OK] sympy/core/tests/test_match.py[26] ......f................... [OK] sympy/core/tests/test_multidimensional.py[4] .... [OK] sympy/core/tests/test_numbers.py[29] ............................. [OK] sympy/core/tests/test_relational.py[5] ..... [OK] sympy/core/tests/test_subs.py[20] ...............F.... [FAIL] sympy/core/tests/test_symbol.py[5] ..... [OK] sympy/core/tests/test_sympify.py[18] .................. [OK] sympy/core/tests/test_truediv.py[3] ... [OK] sympy/core/tests/test_var.py[4] .... [OK] ________________________________________________________________________________ ____________________ sympy/core/tests/test_subs.py:test_mul ____________________ File "/home/ondrej/repos/sympy/sympy/core/tests/test_subs.py", line 144, in test_mul assert (x*y*z).subs(z*x,y) == y**2 AssertionError ======= tests finished: 318 passed, 1 failed, 7 xfailed in 1.57 seconds ======== DO *NOT* COMMIT! and then try to fix the other ones too. Let me know if you need any help, we are also on #sympy at freenode for life chat. -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy-issues" group. To post to this group, send email to sympy-issues@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 -~----------~----~----~----~------~----~------~--~---