[pypy-dev] Re: Pypy frontend/ testall.py

Michael Hudson mwh at python.net
Mon Mar 10 14:04:13 CET 2003

Armin Rigo <arigo at tunes.org> writes:

> Hello Michael,
> On Mon, Mar 10, 2003 at 11:42:47AM +0000, Michael Hudson wrote:
>> >> Additionally, when testing, an "import test" opens the "test" submodule of 
>> >> Lib/pypy/interpreter.
>> ?  Shouldn't do, if $PYTHONPATH is pointing at the directory
>> containing the pypy directory.
> It does, if the current directory is pypy/interpreter (for example when you
> run python 'interactive.py').

So don't do that, run

$ PYTHONPATH=. python pypy/interperter/interactive.py

then.  I can see this being tedious, though.

interactive.py could remove the cwd from sys.path, but that also might
be surprising.

>> > Why is there an __init__.py file in our pypy/interpreter/test/ subdirectory?
>> Because I wanted to import something from there at some point.
> Ok, but then:
>> > We will keep running again and again into this problem.
>> Why?
> Because then you have no way to import the standard library 'test' package 

I actually realised this bit :-) It's just that if you set up your
paths the Right Way(tm) you shouldn't bump into this.

Perhaps we should do a mass test -> pypytest (or something) renaming,
for simplicity.

(relative imports are evil, have I mentioned this lately?)

  I would hereby duly point you at the website for the current pedal
  powered submarine world underwater speed record, except I've lost
  the URL.                                         -- Callas, cam.misc

More information about the Pypy-dev mailing list