Ticket #9880: trac_9880-doctest_for_9046-rebased-5.9.patch

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

    # HG changeset patch
    # User Burcin Erocal <burcin@erocal.org>
    # Date 1341912036 -7200
    # Node ID c170907c5514354976c7c5fea3bfe779b9bf375b
    # Parent  744673548363f0ce0dc5cdc90ed146d8869bd32d
    Add doctest with the example in #9046.
    
    diff --git a/sage/symbolic/expression.pyx b/sage/symbolic/expression.pyx
    a b  
    53485348            sage: bool(str(f) == str(g))
    53495349            True
    53505350
     5351        Check if :trac:`9046` is fixed::
     5352
     5353            sage: var('a b x y z')
     5354            (a, b, x, y, z)
     5355            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
     5356            sage: p.collect(x)
     5357            -a*x^3 + (2*b*y + z + 1)*x^2 + 2*y^3 + y^2*z - (a*y^2 - a)*x + y^2
    53515358        """
    53525359        cdef Expression s0 = self.coerce_in(s)
    53535360        cdef GEx x