[pypy-dev] Re: Pypy frontend/ testall.py
arigo at tunes.org
Mon Mar 10 13:46:18 CET 2003
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').
> > 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.
Because then you have no way to import the standard library 'test' package if
you current directory happens to contain a local 'test' package -- which will
eventually mean almost any PyPy directory. I had the same problems over and
over again with Psyco, which had a 'test.py', until I finally decided to
rename it to 'test1.py'. I my humble opinion it might have been a bad idea to
give a Python standard library package a name as common as 'test', but well,
not everybody is supposed to import it in everyday applications.
More information about the Pypy-dev