Opened 9 years ago
Closed 9 years ago
#12793 closed defect (fixed)
Fix __cmp__ tests in sage/combinat/root_system/type_dual.py
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: |
Description (last modified by )
The following tests were added to sage/combinat/root_system/type_dual.py
by #6588:
def __cmp__(self, other): """ EXAMPLES:: sage: B4 = CartanType(['B', 4]) sage: B4dual = CartanType(['B', 4]).dual() sage: F4dual = CartanType(['F', 4]).dual() sage: cmp(F4dual, F4dual) 0 sage: cmp(F4dual, B4dual) 1 sage: cmp(B4dual, F4dual) -1 sage: cmp(B4dual, B4) 1 .. 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)
Change History (5)
comment:1 Changed 9 years ago by
- Description modified (diff)
Changed 9 years ago by
comment:2 Changed 9 years ago by
comment:3 Changed 9 years ago by
- Reviewers set to Nicolas M. Thiéry
- Status changed from new to needs_review
comment:4 Changed 9 years ago by
- 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.
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!