Opened 9 years ago

Closed 9 years ago

#12793 closed defect (fixed)

Fix __cmp__ tests in sage/combinat/root_system/

Reported by: jdemeyer Owned by: sage-combinat
Priority: blocker Milestone: sage-5.0
Component: combinatorics Keywords:
Cc: Merged in: sage-5.0.beta12
Authors: Jeroen Demeyer Reviewers: Nicolas M. Thiéry
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by jdemeyer)

The following tests were added to sage/combinat/root_system/ by #6588:

    def __cmp__(self, other):

            sage: B4     = CartanType(['B', 4])
            sage: B4dual = CartanType(['B', 4]).dual()
            sage: F4dual = CartanType(['F', 4]).dual()
            sage: cmp(F4dual, F4dual)
            sage: cmp(F4dual, B4dual)
            sage: cmp(B4dual, F4dual)
            sage: cmp(B4dual, B4)

        .. todo:: do we really need a cmp, or just eq?

But whether cmp() outputs 1 or -1 is essentially arbitrary. This must be fixed immediately.

Attachments (1)

12793_type_dual_cmp.patch (1.2 KB) - added by nthiery 9 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 9 years ago by jdemeyer

  • Description modified (diff)

Changed 9 years ago by nthiery

comment:2 Changed 9 years ago by nthiery

I just made a micro change to check that exchanging F4dual and B4dual inverses the sign. If you are happy with it, you can set a positive review on my behalf.

Thanks for fixing my tests!

comment:3 Changed 9 years ago by nthiery

  • Reviewers set to Nicolas M. Thiéry
  • Status changed from new to needs_review

comment:4 Changed 9 years ago by jdemeyer

  • Merged in set to sage-5.0.beta12
  • Resolution set to fixed
  • Status changed from needs_review to closed
Note: See TracTickets for help on using tickets.