[pypy-dev] sympy tests: pypy vs cpython incompatibilities

Ondrej Certik ondrej at certik.cz
Fri Oct 10 13:12:19 CEST 2008


On Thu, Oct 9, 2008 at 2:19 AM, Ondrej Certik <ondrej at certik.cz> wrote:
> Hi,
>
> if you want to get many bugreports, here's how. :)
>
> $ git clone git://git.sympy.org/sympy.git
> $ cd sympy
> $ python
>>>> import sympy
>>>> sympy.test("sympy/core")
> [...]
> ============ tests finished: 292 passed, 9 xfailed in 1.40 seconds =============
> True
>>>>
>
>
> This works in python2.4, python2.5 (there are some failures in
> python2.6) and it *doesn't* require py.test, just pure python.

Holger asked me why we are not using py.test anymore and any
particular feedback. I am not subscribed to py-dev, so I just post it
here.

We still use py.test. But I also want to have something simple
(current implementation has 335 lines) that we can include with sympy,
because py.test is not so easy to install --- you need to install
setuptools, which in particular require python to be compiled with
zlib. So while py.test is fine let's say in Debian or Ubuntu, it was
quite a pain for me to install it 6x on our buildbots:

http://buildbot.sympy.org/waterfall

(E.g. I compiled python2.4, 2.5, 2.6 from python.org, then I realized
that setuptools cannot be installed, because python didn't compile
with the zlib module, because I didn't have the zlib-dev Debian
package installed, so I fixed that, recompiled python, installed
setuptools 6x and then installed py.test 6x).

And we are also porting sympy to jython and it's just easier to just
install sympy and do "sympy.test()" to test that all is ok.

We also thought we could just include py.test in sympy, but py.test
depends on the py lib and it is big. So I just rewrote the necessary
thing from scratch and it can do what I want.

Ondrej



More information about the Pypy-dev mailing list