Issues

Issue #126 resolved

Tests fail with "ASSERT:Environment test script not found in path" (virtualenvwrapper-3.0 source distro)

npinto
created an issue

I'm trying to package virtualenvwrapper-3.0 for Gentoo and found a few issues:

{{{ virtualenv --no-site-packages ~/venv/virtualenvwrapper-bug source ~/venv/virtualenvwrapper-bug/bin/activate

wget http://pypi.python.org/packages/source/v/virtualenvwrapper/virtualenvwrapper-3.0.tar.gz tar xzf virtualenvwrapper-3.0.tar.gz cd virtualenvwrapper-3.0 python setup.py develop

pip install -I tox

WARNING: the next command will complain about tox.ini missing

tox -e py26

create missing tox.ini (should a minimal tox.ini be integrated in the source distro ?)

cat > tox.ini << EOF [testenv] commands = bash ./tests/run_tests {envdir} [] deps = virtualenv EOF

finally!

tox -e py26 }}}

Output:

{{{ ...


Running tests/test_cp.sh VIRTUAL_ENV=/home/npinto/venv/virtualenvwrapper-bug/virtualenvwrapper-3.0/.tox/py26 VIRTUALENVWRAPPER_PYTHON=/home/npinto/venv/virtualenvwrapper-bug/virtualenvwrapper-3.0/.tox/py26/bin/python Python 2.6.6 PYTHONPATH=/home/npinto/local/lib/python2.6/site-packages:/home/npinto/local/lib64/python2.6/site-packages:/home/npinto/local/lib/python2.6/site-packages:/home/npinto/local/lib64/python2.6/site-packages: SHELL=/bin/bash

test_new_env_activated Using real prefix '/usr' New python executable in source/bin/python2.6 Also creating executable in source/bin/python Installing distribute.............................................................................................................................................................................................done. Installing pip...............done. Script /tmp/WORKON_HOME/destination/bin/predeactivate cannot be made relative (it's not a normal script that starts with #!/tmp/WORKON_HOME/destination/bin/python) Script /tmp/WORKON_HOME/destination/bin/activate.fish cannot be made relative (it's not a normal script that starts with #!/tmp/WORKON_HOME/destination/bin/python) Script /tmp/WORKON_HOME/destination/bin/activate.csh cannot be made relative (it's not a normal script that starts with #!/tmp/WORKON_HOME/destination/bin/python) Script /tmp/WORKON_HOME/destination/bin/postdeactivate cannot be made relative (it's not a normal script that starts with #!/tmp/WORKON_HOME/destination/bin/python) Making script /tmp/WORKON_HOME/destination/bin/pip-2.6 relative Making script /tmp/WORKON_HOME/destination/bin/pip relative Making script /tmp/WORKON_HOME/destination/bin/easy_install-2.6 relative Making script /tmp/WORKON_HOME/destination/bin/easy_install relative Script /tmp/WORKON_HOME/destination/bin/get_env_details cannot be made relative (it's not a normal script that starts with #!/tmp/WORKON_HOME/destination/bin/python) Script /tmp/WORKON_HOME/destination/bin/preactivate cannot be made relative (it's not a normal script that starts with #!/tmp/WORKON_HOME/destination/bin/python) Script /tmp/WORKON_HOME/destination/bin/postactivate cannot be made relative (it's not a normal script that starts with #!/tmp/WORKON_HOME/destination/bin/python) which: no testscript.py in (/tmp/WORKON_HOME/destination/bin:/tmp/shunit.Y1SkIt:/home/npinto/venv/virtualenvwrapper-bug/virtualenvwrapper-3.0/.tox/py26/bin:/home/npinto/venv/virtualenvwrapper-bug/virtualenvwrapper-3.0/.tox/py26/bin:/home/npinto/venv/virtualenvwrapper-bug/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.5.3:/opt/cuda/bin:/home/npinto/.utils) ASSERT:Environment test script not found in path }}}

Copying tests/testpackage from the repo fixes the issue.

To summarize, to get the package working, I had to (1) get a minimal tox.ini, (2) copy tests/testpackage from HEAD, and finally (3) chmod +x ./tests/test_dir_stack.sh (to avoid a "permission denied" error).

Comments (6)

  1. Doug Hellmann repo owner
    • changed status to open

    I updated the packaging instructions to include the missing files. I think the permission error is probably due to the "minimal tox.ini" file not having the correct instructions for running the tests. I am running the tests from the packaged version on my system right now. I would appreciate it if you could do the same by checking out the source. If everything works as expected I will tag a new release.

  2. npinto reporter

    Sorry, my last message did not go thru. I was getting "permission denied" errors, and the chmod command above fixed the issue for me.

  3. Log in to comment