Ticket #8986: trac_8986_cmp_fix.patch

File trac_8986_cmp_fix.patch, 654 bytes (added by novoselt, 12 years ago)
  • sage/geometry/cone.py

    # HG changeset patch
    # User Andrey Novoseltsev <novoselt@gmail.com>
    # Date 1277998069 21600
    # Node ID c9215ab030c9d25249bd0484ca52d914b902c2cf
    # Parent  02e2e2b6d9cc0cd53b43286e28466ad1983a68c4
    Trac 8986: Fix __cmp__ doctest to eliminate randomness.
    
    diff -r 02e2e2b6d9cc -r c9215ab030c9 sage/geometry/cone.py
    a b  
    522522            0
    523523            sage: c2 is c3
    524524            False
    525             sage: cmp(c1, 1)
     525            sage: cmp(c1, 1) * cmp(1, c1)
    526526            -1
    527527        """
    528528        c = cmp(type(self), type(right))