I just fixed py.test, the results are attached. They should be more
useful that bin/test's results. Note that there are some failures
related to py.test.

Vinzent

2010/4/30 Aaron S. Meurer <asmeu...@gmail.com>:
> The failures are 64-bit only:
>
> 32-bit:
>
> ________________________________________________________________________________
> _______ sympy/utilities/tests/test_code_quality.py:test_implicit_imports 
> _______
>  File 
> "/users/aaronmeurer/documents/python/sympy/sympy/sympy/utilities/tests/test_code_quality.py",
>  line 121, in test_implicit_imports
>    check_directory_tree(SYMPY_PATH, test, exclude)
>  File 
> "/users/aaronmeurer/documents/python/sympy/sympy/sympy/utilities/tests/test_code_quality.py",
>  line 58, in check_directory_tree
>    file_check(fname)
>  File 
> "/users/aaronmeurer/documents/python/sympy/sympy/sympy/utilities/tests/test_code_quality.py",
>  line 110, in test
>    assert False, message_implicit % (fname, idx+1)
> AssertionError: File contains an implicit import: 
> /users/aaronmeurer/documents/python/sympy/sympy/sympy/solvers/solvers.py, 
> line 2737.
>
>  tests finished: 2068 passed, 1 failed, 5 skipped, 41 expected to fail,
> 4 expected to fail but passed, in 400.73 seconds
> DO *NOT* COMMIT!
>
>
> 64-bit:
>
> ________________________________________________________________________________
> __________ sympy/solvers/tests/test_solvers.py:test_solve_polynomial1 
> __________
>  File 
> "/users/aaronmeurer/documents/python/sympy/sympy/sympy/solvers/tests/test_solvers.py",
>  line 144, in test_solve_polynomial1
>    -x**Rational(1,3)*(2 - 2*I*sqrt(3))/4,
> AssertionError
> ________________________________________________________________________________
> ______________ sympy/solvers/tests/test_solvers.py:test_tsolve_1 
> _______________
>  File 
> "/users/aaronmeurer/documents/python/sympy/sympy/sympy/solvers/tests/test_solvers.py",
>  line 266, in test_tsolve_1
>    [log(y/2 + sqrt(-4 + y**2)/2), log(y/2 - sqrt(-4 + y**2)/2)])
> AssertionError
> ________________________________________________________________________________
> _______ sympy/utilities/tests/test_code_quality.py:test_implicit_imports 
> _______
>  File 
> "/users/aaronmeurer/documents/python/sympy/sympy/sympy/utilities/tests/test_code_quality.py",
>  line 121, in test_implicit_imports
>    check_directory_tree(SYMPY_PATH, test, exclude)
>  File 
> "/users/aaronmeurer/documents/python/sympy/sympy/sympy/utilities/tests/test_code_quality.py",
>  line 58, in check_directory_tree
>    file_check(fname)
>  File 
> "/users/aaronmeurer/documents/python/sympy/sympy/sympy/utilities/tests/test_code_quality.py",
>  line 110, in test
>    assert False, message_implicit % (fname, idx+1)
> AssertionError: File contains an implicit import: 
> /users/aaronmeurer/documents/python/sympy/sympy/sympy/solvers/solvers.py, 
> line 2737.
>
>  tests finished: 2056 passed, 3 failed, 1 skipped, 46 expected to fail,
> 3 expected to fail but passed, in 264.23 seconds
> DO *NOT* COMMIT!
>
>
> The SHA1 is d140b9e2957cbe6925e78fdeb271be578aadfbd7.
>
> Aaron Meurer
>
> On Apr 29, 2010, at 10:15 PM, smichr wrote:
>
>> Please reconfirm (and perhaps show the commit number so we know we are
>> talking about the same version).
>>
>> It all works for me:
>>
>>
>> sympy\solvers\tests
>> \test_solvers.py[18] ..................                  [OK]
>>
>>
>> ================== tests finished: 18 passed, in 7.59 seconds
>> ==================
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "sympy-patches" group.
>> To post to this group, send email to sympy-patc...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> sympy-patches+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/sympy-patches?hl=en.
>>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sympy-patches" group.
> To post to this group, send email to sympy-patc...@googlegroups.com.
> To unsubscribe from this group, send email to 
> sympy-patches+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/sympy-patches?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy-patches" group.
To post to this group, send email to sympy-patc...@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-patches+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy-patches?hl=en.

=================================== FAILURES ===================================
_________________________________ test_polygon _________________________________

    def test_polygon():
        p1 = Polygon(
            Point(0, 0), Point(3,-1),
            Point(6, 0), Point(4, 5),
            Point(2, 3), Point(0, 3))
        p2 = Polygon(
            Point(6, 0), Point(3,-1),
            Point(0, 0), Point(0, 3),
            Point(2, 3), Point(4, 5))
        p3 = Polygon(
            Point(0, 0), Point(3, 0),
            Point(5, 2), Point(4, 4))
        p4 = Polygon(
            Point(0, 0), Point(4, 4),
            Point(5, 2), Point(3, 0))
    
        #
        # General polygon
        #
        assert p1 == p2
        assert len(p1) == Rational(6)
        assert len(p1.sides) == 6
        assert p1.perimeter == 5+2*sqrt(10)+sqrt(29)+sqrt(8)
        assert p1.area == 22
        assert not p1.is_convex()
        assert p3.is_convex()
        assert p4.is_convex()  # ensure convex for both CW and CCW point 
specification
    
        #
        # Regular polygon
        #
        p1 = RegularPolygon(Point(0, 0), 10, 5)
        p2 = RegularPolygon(Point(0, 0), 5, 5)
    
        assert p1 != p2
        assert p1.interior_angle == 3*pi/5
        assert p1.exterior_angle == 2*pi/5
        assert p2.apothem == 5*cos(pi/5)
        assert p2.circumcircle == Circle(Point(0, 0), 5)
        assert p2.incircle == Circle(Point(0, 0), p2.apothem)
        assert p1.is_convex()
    
        #
        # Angles
        #
        angles = p4.angles
        assert feq(angles[Point(0, 0)].evalf(), Real("0.7853981633974483"))
        assert feq(angles[Point(4, 4)].evalf(), Real("1.2490457723982544"))
        assert feq(angles[Point(5, 2)].evalf(), Real("1.8925468811915388"))
        assert feq(angles[Point(3, 0)].evalf(), Real("2.3561944901923449"))
    
        angles = p3.angles
        assert feq(angles[Point(0, 0)].evalf(), Real("0.7853981633974483"))
        assert feq(angles[Point(4, 4)].evalf(), Real("1.2490457723982544"))
        assert feq(angles[Point(5, 2)].evalf(), Real("1.8925468811915388"))
        assert feq(angles[Point(3, 0)].evalf(), Real("2.3561944901923449"))
    
        #
        # Triangle
        #
        p1 = Point(0, 0)
        p2 = Point(5, 0)
        p3 = Point(0, 5)
        t1 = Triangle(p1, p2, p3)
        t2 = Triangle(p1, p2, Point(Rational(5,2), sqrt(Rational(75,4))))
        t3 = Triangle(p1, Point(x1, 0), Point(0, x1))
        s1 = t1.sides
        s2 = t2.sides
        s3 = t3.sides
    
        # Basic stuff
        assert t1.area == Rational(25,2)
        assert t1.is_right()
        assert t2.is_right() == False
        assert t3.is_right()
        assert p1 in t1
        assert Point(5, 5) not in t2
        assert t1.is_convex()
        assert feq(t1.angles[p1].evalf(), pi.evalf()/2)
    
        assert t1.is_equilateral() == False
        assert t2.is_equilateral()
        assert t3.is_equilateral() == False
        assert are_similar(t1, t2) == False
        assert are_similar(t1, t3)
        assert are_similar(t2, t3) == False
    
        # Bisectors
        bisectors = t1.bisectors
>       assert bisectors[p1] == Segment(p1, Point(Rational(5,2), Rational(5,2)))
E       assert Segment(Point(Zero, Zero), Point(Mul(Pow(Add(Integer(300), 
Mul(Integer(200), P...ativeOne), Add(Integer(750), Mul(Integer(500), 
Pow(Integer(2), Half(1, 2))))))) == Segment(Point(Zero, Zero), 
Point(Rational(5, 2), Rational(5, 2)))
E        +  where Segment(Point(Zero, Zero), Point(Rational(5, 2), Rational(5, 
2))) = Segment(Point(Zero, Zero), Point(Rational(5, 2), Rational(5, 2)))
E        +    where Point(Rational(5, 2), Rational(5, 2)) = Point(5/2, 5/2)
E        +      where 5/2 = Rational(5, 2)
E        +      and   5/2 = Rational(5, 2)

sympy/geometry/tests/test_geometry.py:357: AssertionError
________________________________ test_simplify _________________________________

    def test_simplify():
        x, y, z, k, n, m, w, f, s, A = symbols('xyzknmwfsA')
    
        assert all(simplify(tmp) == tmp for tmp in [I, E, oo, x, -x, -oo, -E, 
-I])
>       assert simplify(1/(1+sqrt(2))) == sqrt(2) - 1 # should radsimp of 
> numbers be automatic?
E       assert 1/(1 + 2**(1/2)) == (2**(1/2) - 1)
E        +  where 1/(1 + 2**(1/2)) = simplify((1 / (1 + 2**(1/2))))
E        +    where 2**(1/2) = sqrt(2)
E        +  and   2**(1/2) = sqrt(2)

sympy/simplify/tests/test_simplify.py:111: AssertionError
_________________________________ test_radsimp _________________________________

    def test_radsimp():
        from sympy.abc import x, y
        assert radsimp(oo) == oo
        eq = 1/(3 + x); assert radsimp(eq) == eq
        eq = 1/(3+x**Rational(1,3)); assert radsimp(eq) == eq
        eq = 1/(x**Rational(1,3)+sqrt(x)); assert radsimp(eq) == eq
        eq = 1/(2 + sqrt(y) + sqrt(x)); assert radsimp(eq) == eq
        assert radsimp(1/(sqrt(y)+sqrt(x))) in \
               [(sqrt(y) - sqrt(x))/(y-x),
>               (sqrt(x) - sqrt(y))/(x-y)
E               AssertionError: (assertion failed, but when it was re-run for 
printing intermediate values, it did not fail.  Suggestions: compute assert 
expression before the assert or use --no-assert)

sympy/simplify/tests/test_simplify.py:627: AssertionError
____________________________ test_solve_polynomial1 ____________________________

    def test_solve_polynomial1():
        x, y = symbols('xy')
    
        assert equal(solve(3*x-2, x),
                     [Rational(2,3)])
        assert equal(solve(Eq(3*x, 2), x),
                     [Rational(2,3)])
    
        assert equal(solve(x**2-1, x),
                     [-1, 1])
        assert equal(solve(Eq(x**2, 1), x),
                     [-1, 1])
    
        assert equal(solve( x - y**3, x),
                     [y**3])
    
        assert equal(solve( x - y**3, y),
                     [x**Rational(1,3),
                    -x**Rational(1,3)*(2 + 2*I*sqrt(3))/4, #TODO equal should 
let this pass if the 2 is factored out of num and den
>                   -x**Rational(1,3)*(2 - 2*I*sqrt(3))/4,
E                   AssertionError: (assertion failed, but when it was re-run 
for printing intermediate values, it did not fail.  Suggestions: compute assert 
expression before the assert or use --no-assert)

sympy/solvers/tests/test_solvers.py:144: AssertionError
________________________________ test_tsolve_1 _________________________________

    def test_tsolve_1():
        from sympy.simplify.simplify import gcdfactor
        a, b = symbols('ab')
        x, y, z = symbols('xyz')
        assert equal(solve(exp(x)-3, x),
                     [log(3)])
        assert equal(solve((a*x+b)*(exp(x)-3), x),
                     [-b/a, log(3)])
        assert equal(solve(cos(x)-y, x),
                     [acos(y)])
        assert solve(2*cos(x)-y,x)== [acos(y/2)]
        assert equal(solve(Eq(cos(x), sin(x)), x),
                     [pi/4, 3*pi/4])
    
        assert equal(solve(exp(x)+exp(-x)-y, x),
>                    [log(y/2 + sqrt(-4 + y**2)/2), log(y/2 - sqrt(-4 + 
> y**2)/2)])
E       assert equal([-2*log(2) + log(2*y + 2*(-4 + y**2)**(1/2)), -2*log(2) + 
log(2*y - 2*(-4 + y**2)**(1/2))], [log(y/2 + (-4 + y**2)**(1/2)/2), log(y/2 - 
(-4 + y**2)**(1/2)/2)])
E        +  where [-2*log(2) + log(2*y + 2*(-4 + y**2)**(1/2)), -2*log(2) + 
log(2*y - 2*(-4 + y**2)**(1/2))] = solve(((exp(x) + exp(-x)) - y), x)
E        +    where exp(x) = exp(x)
E        +    and   exp(-x) = exp(-x)

sympy/solvers/tests/test_solvers.py:266: AssertionError
____________________________ test_implicit_imports _____________________________

    def test_implicit_imports():
        """
        Tests that all files except __init__.py use explicit imports,
        even in the docstrings.
        """
        def test(fname):
            file = open(fname, "r")
            try:
                for idx, line in enumerate(file):
                    if re.match("^\s*(>>>)? from .* import .*\*",line):
                        assert False, message_implicit % (fname, idx+1)
            finally:
                file.close()
    
        exclude = set([
            "%(sep)sthirdparty%(sep)s" % sepd,
            "%(sep)s__init__.py" % sepd,
            # these two should be fixed:
            "%(sep)smpmath%(sep)s" % sepd,
            "%(sep)splotting%(sep)s" % sepd,
        ])
>       check_directory_tree(SYMPY_PATH, test, exclude)

sympy/utilities/tests/test_code_quality.py:121: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

base_path = '/home/one/src/sympy/sympy'
file_check = <function test at 0x177310c8>
exclusions = set(['/__init__.py', '/mpmath/', '/plotting/', '/thirdparty/'])

    def check_directory_tree(base_path, file_check, exclusions=set()):
        """
        Checks all files in the directory tree (with base_path as starting 
point)
        with the file_check function provided, skipping files that contain
        any of the strings in the set provided by exclusions.
        """
        if not base_path:
            return
        for root, dirs, files in walk(base_path):
            for fname in glob(join(root, "*.py")):
                if filter(lambda ex: ex in fname, exclusions):
                    continue
>               file_check(fname)

sympy/utilities/tests/test_code_quality.py:58: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

fname = '/home/one/src/sympy/sympy/solvers/solvers.py'

    def test(fname):
        file = open(fname, "r")
        try:
            for idx, line in enumerate(file):
                if re.match("^\s*(>>>)? from .* import .*\*",line):
>                   assert False, message_implicit % (fname, idx+1)
E                   AssertionError: File contains an implicit import: 
/home/one/src/sympy/sympy/solvers/solvers.py, line 2737.

sympy/utilities/tests/test_code_quality.py:110: AssertionError
_________________________________ test_raises __________________________________

    def test_raises():
        class My(Exception):
            pass
        class My2(Exception):
            pass
        raises(My, "raise My()")
    
        try:
            raises(My, "1+1")
            assert False
        except Exception, e:
>           assert str(e) == "DID NOT RAISE"
E           assert str('DID NOT RAISE') == 'DID NOT RAISE'

sympy/utilities/tests/test_pytest.py:14: AssertionError
45 expected failures, use --report=xfailed for more info
14 skipped tests, use --report=skipped for more info
== 7 failed, 2063 passed, 14 skipped, 45 xfailed, 4 xpassed in 254.35 seconds ==

Reply via email to