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

holger krekel holger at merlinux.eu
Fri Oct 10 15:04:47 CEST 2008


Hi Ondrej, 

On Fri, Oct 10, 2008 at 13:12 +0200, Ondrej Certik wrote:
> 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.

thanks - i am cross-posting this to py-dev. 
 
> 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).

Hum, that's kind of bothersome, i agree.  I wonder if going
away from setuptools makes sense, shouldn't be hard. 

> 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.

right, makes sense. 
 
> 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.

Raymond Hettinger at some point also wrote a pytest one-file
script with a subset of features.  Probably providing 
something like that officially makes sense.   Also 
i'd like to work a bit on minimizing py lib (i plan
to factor some parts out into plugins soon) - most of it
is actually used from py.test. 

best,

holger

-- 
collaborative expert contracting: http://merlinux.eu 
PyPy  Python/Compiler tool chain: http://codespeak.net/pypy 
pylib py.test/greenlets/svn APIs: http://pylib.org 



More information about the Pytest-dev mailing list