Ticket #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: | Work issues: | ||
| Report Upstream: | N/A | Reviewers: | Nicolas M. Thiéry |
| Authors: | Jeroen Demeyer | Merged in: | sage-5.0.beta12 |
| Dependencies: | Stopgaps: |
Description (last modified by jdemeyer) (diff)
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
Change History
comment:2 Changed 14 months 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!
Note: See
TracTickets for help on using
tickets.

