Ah, I didn't notice that you had changed the test.

I don't understand how cse is reordering the terms.  If you do "assert
expr.args[0] == ans.args[1]" and "assert expr.args[1] == ans.args[0]",
those both pass.  Somehow, cse is bypassing Add.flatten.

Aaron Meurer

On Sat, Jul 14, 2012 at 12:18 AM, Aaron Meurer <asmeu...@gmail.com> wrote:
> Tests now pass in your branch with that seed.
>
> Aaron Meurer
>
> On Fri, Jul 13, 2012 at 11:54 PM, Chris Smith <smi...@gmail.com> wrote:
>> On Sat, Jul 14, 2012 at 12:04 AM, Aaron Meurer <asmeu...@gmail.com> wrote:
>>> Nope.  Same test failure.  Same reason.
>>>
>>
>> OK, I think I understand the problem: each Subs instance creates its
>> own dummies; those cause the hash-ed args to sort differently so the
>> two sides of the equality aren't the same. I pushed something that I
>> think will make the test pass. (If dummies aren't used then the two
>> would be equal *except* for the dummies introduced by cse which causes
>> the new ordering of the terms.)
>>
>> I also got 2.7.3 installed and found that cse tests are prone to
>> failure unless the preordertraversal uses sorting. Nothing had failed
>> before so I didn't include it, but now in running the tests on cse
>> several times I see that it does fail occasionally, so I now use the
>> key option for the preordertraversal.
>>
>> I've opened a new pull request.
>>
>> /c
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "sympy" group.
>> To post to this group, send email to sympy@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> sympy+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/sympy?hl=en.
>>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to