Ticket #9880: trac_9880-doctest_for_9046-sage_5_10_beta2.patch

File trac_9880-doctest_for_9046-sage_5_10_beta2.patch, 852 bytes (added by burcin, 7 years ago)
  • sage/symbolic/expression.pyx

    # HG changeset patch
    # User Burcin Erocal <burcin@erocal.org>
    # Date 1341912036 -7200
    # Node ID 8f5149eaebf5469d4d1f5142c536f2774b875664
    # Parent  a28c161b3e1d64e11db6025e51b8169a932cf06f
    Add doctest with the example in #9046.
    
    diff --git a/sage/symbolic/expression.pyx b/sage/symbolic/expression.pyx
    a b  
    53105310            sage: bool(str(f) == str(g))
    53115311            True
    53125312
     5313        Check if :trac:`9046` is fixed::
     5314
     5315            sage: var('a b x y z')
     5316            (a, b, x, y, z)
     5317            sage: p = -a*x^3 - a*x*y^2 + 2*b*x^2*y + 2*y^3 + x^2*z + y^2*z + x^2 + y^2 + a*x
     5318            sage: p.collect(x)
     5319            -a*x^3 + (2*b*y + z + 1)*x^2 + 2*y^3 + y^2*z - (a*y^2 - a)*x + y^2
    53135320        """
    53145321        cdef Expression s0 = self.coerce_in(s)
    53155322        cdef GEx x