On Fri, Nov 21, 2008 at 3:19 AM, Oyster <[EMAIL PROTECTED]> wrote: > > it is so strange, I have installed py lib 0.9.2, but > [code] >>>> from py.__.test.outcome import * >>>> dir() > ['EXIT_INTERNALERROR', 'EXIT_INTERRUPTED', 'EXIT_NOHOSTS', 'EXIT_OK', > 'EXIT_TESTSFAILED', 'ExceptionFailure', 'Exit', 'Failed', > 'OutcomeException', 'Passed', 'Skipped', '__builtins__', '__doc__', > '__name__', 'deprecated_call', 'exit', 'fail > ', 'importorskip', 'py', 'raises', 'skip', 'sys'] > [/code] > you can find the is no Outcome
With py.test 0.9.1-3: In [1]: from py.__.test.outcome import Outcome In [2]: Outcome Out[2]: <class py.__.test.outcome.Outcome at 0xb76f9b9c> So they changed the interface and it breaks sympy. In sympy/utilities/py.test we have: try: import py disabled = False except ImportError: disabled = True So normally it is disabled and not used if the py.test is not installed. Thanks for noticing this, it is a bug and the fix is to move all the imports into the "try" clause above. http://code.google.com/p/sympy/issues/detail?id=1210 > > so I changed sympy\utilities\pytest.py > [code] > from pytest import raises > [/code] > to > [code] > #from pytest import raises > [/code] > > else > > [code] >>>> from sympy import Symbol, cos > > Traceback (most recent call last): > File "<pyshell#0>", line 1, in -toplevel- > from sympy import Symbol, cos > File "H:\pure_pylib\math\sympy\sympy\__init__.py", line 18, in - > toplevel- > from polys import * > File "H:\pure_pylib\math\sympy\sympy\polys\__init__.py", line 2, in - > toplevel- > from monomial import monomials, monomial_count > File "H:\pure_pylib\math\sympy\sympy\polys\monomial.py", line 6, in - > toplevel- > from sympy.functions import factorial > File "H:\pure_pylib\math\sympy\sympy\functions\__init__.py", line 9, > in -toplevel- > import combinatorial > File "H:\pure_pylib\math\sympy\sympy\functions\combinatorial > \__init__.py", line 3, in -toplevel- > import numbers > File "H:\pure_pylib\math\sympy\sympy\functions\combinatorial > \numbers.py", line 20, in -toplevel- > from sympy.utilities.memoization import recurrence_memo > File "H:\pure_pylib\math\sympy\sympy\utilities\__init__.py", line > 20, in -toplevel- > from pytest import raises > File "H:\pure_pylib\math\sympy\sympy\utilities\pytest.py", line 47, > in -toplevel- > from py.__.test.outcome import Outcome, Passed, Failed, Skipped > ImportError: cannot import name Outcome > [/code] Ondrej --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@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?hl=en -~----------~----~----~----~------~----~------~--~---