You are testing whether the result from simplify is structurally the same as a predefined answer, but simplify does not guarantee that it will give the same result each time.
It is giving mathematically equivalent result, it just decided that it should factor out a minus sign. The simplest solution would be to rewrite tests of the form: >>> a.simplify() b into >> (a-b).simplify() 0 but this is somewhat ugly, especially for doctests which should be more of a documentation tool. However, if a doctest is so complicated it might be a good idea to move it to a test file and write a new, simpler doctest. On 7 September 2013 16:52, Sachin Joglekar <[email protected]> wrote: > I am currently working on a PR to modify the mechanics core - #2412. The > Travis build seems to be failing for a couple of doctests in the > doc/src/modules/physics/mechanics/bicycle_example.rst file. Have a look here > - https://travis-ci.org/sympy/sympy/jobs/11069792 > The problem is, neither Gilbert nor I are able to figure out why. The > weirder stuff is, doing > ./bin/doctest -n doc/src/modules/physics/mechanics/bicycle_example.rst > on my machine gives no error once, and 5 errors the next time I run it > (Without altering any code in the meantime). Same goes for the command > without the '-n' parameter. > Can anybody help us out with this? The PR is stuck at this issue, and we > need to resolve it soon. (I have attached a file with the errors shown) > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/sympy. > For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sympy. For more options, visit https://groups.google.com/groups/opt_out.
