Comment #3 on issue 1267 by ondrej.certik: improve our str printer:
1/cos(x)*sin(x) -> sin(x)/cos(x)
http://code.google.com/p/sympy/issues/detail?id=1267
Thanks for the patch!
The tests need to be changed as well:
$ bin/test sympy/printing/
============================= test process starts
==============================
executable: /usr/bin/python (2.5.2-final-0)
sympy/printing/pretty/tests/test_pretty.py[16] ................
[OK]
sympy/printing/pretty/tests/test_pretty_unicode.py[18] ..................
[OK]
sympy/printing/tests/test_ccode.py[4] .F..
[FAIL]
sympy/printing/tests/test_gtk.py[1] X
[OK]
sympy/printing/tests/test_lambdarepr.py[2] ..
[OK]
sympy/printing/tests/test_latex.py[14] ..........f...
[OK]
sympy/printing/tests/test_mathml.py[7] .......
[OK]
sympy/printing/tests/test_precedence.py[11] ...........
[OK]
sympy/printing/tests/test_python.py[6] ......
[OK]
sympy/printing/tests/test_repr.py[19] ...................
[OK]
sympy/printing/tests/test_str.py[54] ..F..F..............F......................
...........
[FAIL]
________________________________ xpassed tests
_________________________________
sympy/printing/tests/test_gtk.py:'XPASS: test_1'
________________________________________________________________________________
______________ sympy/printing/tests/test_ccode.py:test_ccode_Pow
_______________
File "/home/ondra/repos/sympy/sympy/printing/tests/test_ccode.py", line
19, in
test_ccode_Pow
"1/(y + pow(x,2))*pow((3.50000000000000*g(x)),(-x + pow(y,x)))"
AssertionError
________________________________________________________________________________
__________________ sympy/printing/tests/test_str.py:test_Add
___________________
File "/home/ondra/repos/sympy/sympy/printing/tests/test_str.py", line 39,
in test_Add
assert str(1+x+x**2/2+x**3/3) == "1 + x + 1/2*x**2 + 1/3*x**3"
AssertionError
________________________________________________________________________________
_______________ sympy/printing/tests/test_str.py:test_Derivative
_______________
File "/home/ondra/repos/sympy/sympy/printing/tests/test_str.py", line 58,
in
test_Derivative
assert str(Derivative(x**2/y, x, y, evaluate=False)) == "D(1/y*x**2, x,
y)"
AssertionError
________________________________________________________________________________
_________________ sympy/printing/tests/test_str.py:test_Limit
__________________
File "/home/ondra/repos/sympy/sympy/printing/tests/test_str.py", line
122, in
test_Limit
assert str(Limit(sin(x)/x, x, y)) == "Limit(1/x*sin(x), x, y)"
AssertionError
== tests finished: 146 passed, 4 failed, 1 xfailed, 1 xpassed in 0.57
seconds ==
DO *NOT* COMMIT!
Then we can commit it.
--
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en
-~----------~----~----~----~------~----~------~--~---