Ticket #10849: trac_10849-doctests-on_9880.patch

File trac_10849-doctests-on_9880.patch, 845 bytes (added by burcin, 8 years ago)
  • sage/symbolic/expression.pyx

    # HG changeset patch
    # User Burcin Erocal <burcin@erocal.org>
    # Date 1326174898 -3600
    # Node ID 7397093f7978a5b0a7c0c03fb6ec19ff1cf104f4
    # Parent  cc67b257b8bfbd97c67170ded56b945df9210c70
    trac 10849: add doctests for fix to number field element comparison
    
    diff --git a/sage/symbolic/expression.pyx b/sage/symbolic/expression.pyx
    a b  
    28562856            sage: g = expand(iterkate(7))
    28572857            sage: g.nops()
    28582858            480
     2859
     2860        Check if :trac:`10849` is fixed::
     2861
     2862            sage: t = I.pyobject().parent()(-1/2)
     2863            sage: t > 0
     2864            False
     2865            sage: t = I*x-1/2; t
     2866            I*x - 1/2
     2867            sage: t.subs(x=I*x).subs(x=0).is_positive()
     2868            False
    28592869        """
    28602870        return (<Element>left)._cmp(right)
    28612871