On Sat, Jun 30, 2012 at 12:29 PM, Aaron Meurer <asmeu...@gmail.com> wrote:
> As I noted on your pull request, I think a better way is to just wrap
> the output in an unordered type (set or dict), and let either the
> pretty printer or the doctest printer sort the output (both will do
> so). That way, we don't have to add any extra boilerplate to the
> doctests, which, as was noted, does make them harder to read as
> examples.
>
> For the regular tests, from what I've seen so far, the problem is
> either sorted data types coming out in a different order (like lists
> from solve), or results coming out completely different (but still
> correct).  The former case is easy to fix: just compare sets.  For the
> latter, I'm not sure.  A good example of this is cse().  You can get
> pretty different results.  I looked at the code, and it's not only
> dependent on the order of .args, but also on an iteration through a
> dictionary (which is not guaranteed to be the same even without hash
> randomization).
>
> If someone wants to look at the cse() issue specifically, take a look
> at the failing test_issue_3022() from sympy/core/tests/test_expand.py.

Why not to rewrite the tests for cse() to become functional -- that is,
we would write a function that takes the cse() result and it does the
substitution and verifies that
things work (are equal to the original). That should be independent of hash().

Ondrej

-- 
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