details: http://hg.sympy.org/sympy/rev/7d2a64c5aae9 changeset: 1809:7d2a64c5aae9 user: Ondrej Certik <[EMAIL PROTECTED]> date: Fri Oct 17 15:48:23 2008 +0200 description: Tests for all failures in the issue #991 added.
diffs (35 lines): diff -r 74ceba3bd011 -r 7d2a64c5aae9 sympy/core/tests/test_basic.py --- a/sympy/core/tests/test_basic.py Fri Oct 17 15:48:22 2008 +0200 +++ b/sympy/core/tests/test_basic.py Fri Oct 17 15:48:23 2008 +0200 @@ -168,6 +168,10 @@ def test_as_leading_term2(): assert (x*cos(1)*cos(1 + sin(1)) + sin(1 + sin(1))).as_leading_term(x) == \ sin(1 + sin(1)) + +def test_as_leading_term3(): + assert (2+pi+x).as_leading_term(x) == 2 + pi + assert (2*x+pi*x+x**2).as_leading_term(x) == 2*x + pi*x def test_atoms(): assert sorted(list(x.atoms())) == [x] diff -r 74ceba3bd011 -r 7d2a64c5aae9 sympy/series/tests/test_order.py --- a/sympy/series/tests/test_order.py Fri Oct 17 15:48:22 2008 +0200 +++ b/sympy/series/tests/test_order.py Fri Oct 17 15:48:23 2008 +0200 @@ -1,4 +1,4 @@ -from sympy import Symbol, Rational, Order, C, exp, ln, log, O, var, nan +from sympy import Symbol, Rational, Order, C, exp, ln, log, O, var, nan, pi from sympy.utilities.pytest import XFAIL from sympy.abc import w, x, y, z @@ -167,6 +167,11 @@ assert (2+x**2).extract_leading_order(x) == ((2, O(1, x)),) assert (x+x**2).extract_leading_order(x) == ((x, O(x)),) +def test_leading_order2(): + assert (2+pi+x**2).extract_leading_order(x) == ((pi, O(1, x)), (2, O(1, x))) + assert (2*x+pi*x+x**2).extract_leading_order(x) == ((2*x, O(x)), + (x*pi, O(x))) + def test_order_leadterm(): assert O(x**2)._eval_as_leading_term(x) == O(x**2) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy-commits" group. To post to this group, send email to sympy-commits@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sympy-commits?hl=en -~----------~----~----~----~------~----~------~--~---