#9121: sage-4.4.3.alpha1: set.py doctest failure
-----------------------+----------------------------------------------------
Reporter: was | Owner: tbd
Type: defect | Status: needs_review
Priority: blocker | Milestone: sage-4.4.3
Component: doctest | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
-----------------------+----------------------------------------------------
Changes (by was):
* status: new => needs_review
Old description:
> This test now fails, since it really just compares types and as sage
> grows types get loaded into different places in memory:
> {{{
> sage: Primes() < Set(QQ)
> True
> }}}
New description:
This test now fails in set.py:
{{{
sage: Primes() < Set(QQ)
True
}}}
--
Comment:
I noticed a bug while looking at the relevant code in __cmp__:
{{{
if not isinstance(right, Set_object):
return cmp(type(right), type(Set_object))
return cmp(self.__object, right.__object)
}}}
Notice that the first compare is totally backwards! Interestingly,
fixing this does fix the above bug. Patch attached.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9121#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" 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/sage-trac?hl=en.