details: http://hg.sympy.org/sympy/rev/b92a6c3e37e3 changeset: 1801:b92a6c3e37e3 user: Ondrej Certik <[EMAIL PROTECTED]> date: Fri Oct 17 15:48:22 2008 +0200 description: Tests written for Basic.as_leading_term().
diffs (20 lines): diff -r 087e11d74c54 -r b92a6c3e37e3 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:22 2008 +0200 @@ -150,6 +150,16 @@ assert (x+1).leadterm(x)[1] == 0 assert (x+x**2).leadterm(x)[1] == 1 assert (x**2).leadterm(x)[1] == 2 + +def test_as_leading_term(): + assert (3+2*x**(log(3)/log(2)-1)).as_leading_term(x) == 3 + assert (1/x**2+1+x+x**2).as_leading_term(x) == 1/x**2 + assert (1/x+1+x+x**2).as_leading_term(x) == 1/x + assert (x**2+1/x).as_leading_term(x) == 1/x + assert (1+x**2).as_leading_term(x) == 1 + assert (x+1).as_leading_term(x) == 1 + assert (x+x**2).as_leading_term(x) == x + assert (x**2).as_leading_term(x) == x**2 def test_atoms(): assert sorted(list(x.atoms())) == [x] --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---