Since I did take a bit of a look at doctest failures recently, I
thought I would make my conclusions public, although a lot of this is
going to be self-evident.

Apparently, the reasons for doctest failures now belong to two groups:

1. instances of Basic are output, and some .args get output in
   arbitrary order;

2. non-Basic thinks are output, and get output in arbitrary order.

I suggest solving (1) by altering the corresponding printing functions
to sort their arguments, just as it has recently been done for
FiniteSet.  This is an elementary change, it shouldn't impact the
performance of tests, since doctests don't generally get sufficiently
large for that.  Nevertheless, I believe it is going to sort out a lot
of failures.

Each failure of type (2) would require a more specific approach.
However, I'll try once again to push through the idea of defining
sympy.utilities.sympysort in the following way:

sympysort(x) = sorted(x, key=default_sort_key)

This will make the doctests which output non-Basic objects uglier, but
not less clearer with sympysort.  Further, there are not that many
doctest failures of type (2), which makes me believe that resorting to
sympysort in a couple cases wouldn't be that fatal.

I'm looking forward to suggestions.  Whenever something more or less
final is decided, I'll implement it.

Sergiu

P.S.  As noted in [0], altering the actual testing code is impractical
in solving such kind of failures.

[0] https://github.com/sympy/sympy/pull/1393#issuecomment-6684465

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