[pypy-dev] Some more tests passing

Armin Rigo arigo at tunes.org
Sun Feb 6 11:55:29 CET 2005


Hi Laura,

On Sat, Feb 05, 2005 at 02:12:06PM +0100, Laura Creighton wrote:
> At some point I want to build a 'how to run a CPython test, fix any bugs' for
> the 60% goal for PyCon.  (Assuming Seo doesn't fix them all :-) )
> Is this what you want people officially to do?

Yes :-)

Here are some hints:

    cd lib-python-2.3.4/test/
    py.test test_somestuff.py

This runs the test using PyPy's testing machinery.  If you suspect that
py.test might not do the correct thing, you can also try:

    py.py test_somestuff.py

which is the immediate equivalent of "python test_somestuff.py", which just
runs the test without all of py.test's integration (and without speed
optimizations either).

Tests that pass should be listed in lib-python-2.3.4/test/conftest.py.

Some tests really check for some dark internal details of CPython and have no
chance to pass unmodified.  In this case it is possible to copy and modify
them for PyPy:

    svn cp  lib-python-2.3.4/test/test_darkcorner.py  pypy/lib/test2/

Then you can fix the test in pypy/lib/test2/.

Note that a number of tests need such small tweaks because old-style classes
are not integrated in PyPy by default, so the classes defined by the test are
new-style ones, although the test expects them to behave like old-style ones.  
I guess that such tests can be temporarily fixed if it's easy, otherwise just
ignored.


Armin



More information about the Pypy-dev mailing list