Comment #4 on issue 2041 by asmeurer: Doctest failures in Python 2.6.6
http://code.google.com/p/sympy/issues/detail?id=2041
Maybe for the match one, but the one that is so strange is the
AssumptionsContext() vs. AssumptionsContext([]). Even
typing "global_assumptions" in the Python 2.6.6 interpreter gives
AssumptionsContext()--it's only the doctest that wants to have
AssumptionsContext([]) for some reason.
AssumptionsContext() subclasses from set, which must be behaving
differently somehow. Actually, it seems that it should be doing
AssumptionsContext([]) in all cases:
Python 2.6.6 (r266:84292, Aug 26 2010, 15:18:28)
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
class Test(set):
... pass
...
Test()
Test([])
Python 2.7 (r27:82500, Jul 7 2010, 09:05:48)
[GCC 4.2.1 (Apple Inc. build 5659)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
class Test(set):
... pass
...
Test()
Test([])
So maybe the solution at least there is to have AssumptionsContext subclass
from Basic so we can use our own printer for it (or else redefine __str__,
which might also work).
As far as the other failures:
float(Rational(1193,990))
Expected:
1.20505050505
Got:
1.2050505050505051
Maybe we just need to skip this one (?)
Expected:
(2**(1/2)/2, 2**(1/2)/2, 2**(1/2)/2, Point(1/2, 1/2))
Got:
(2**(1/2)/2, 2**(1/2)/2, 2**(1/2)/2, Point(Half(1, 2), Half(1, 2)))
Probably related to issue 1960.
Expected:
{2: 2, 3: 2, 7: 2}
Got:
{7: 2, 2: 2, 3: 2}
This one is strange. hash(S(7)), hash(S(2)), hash(S(3)), sorted([S(7),
S(2), S(3)]), hash('7'), hash('2'), hash('3'), and sorted(['7', '2', '3'])
all behave exactly the same in Python 2.7 and Python 2.6.6. Again, I
suspect that something might have changed in the doctest runner itself (I
link to the changelog in the mailing list post).
Expected:
KroneckerDelta(i, 1 + i + k)
Got:
KroneckerDelta(i,1 + i + k)
Must be a bug in the printer.
Expected:
3.14159265358979
Got:
mpf('3.1415926535897932')
Ditto.
Expected:
FockStateFermionKet((i,))
Got:
FockStateKet((i,), fermi_level=4)
This one is strange.
The rest are similar to the ones above.
--
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.