New issue 119: {envsitepackagesdir} doesn't substituted site-packages dir of 
tox's testenv
https://bitbucket.org/hpk42/tox/issue/119/envsitepackagesdir-doesnt-substituted-site

Bogdan Hodorog:

# Steps to reproduce #

1. Create the following virtenv (==1.10.1)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.bash}
virtualenv buggytox
buggytox/bin/pip install tox
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The final virtenv should look like:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.bash}
$ buggytox/bin/pip list
pip (1.4.1)
py (1.4.15)
setuptools (0.9.8)
tox (1.6.0)
virtualenv (1.10.1)
wsgiref (0.1.2)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

2. Create a dummy project.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.bash}
mkdir dummy
echo "from setuptools import setup, find_packages

setup(
    name="child",
    version="0.1",
    packages=find_packages(),
)" > dummy/setup.py

echo '[tox]
envlist = buggy

[testenv:buggy]
commands = python -c "{envsitepackagesdir}"' > dummy/tox.ini
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

3. Run tox
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.bash}
cd dummy
tox
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


# Expected #
'.tox/buggytox/lib/python-xx/site-packages' is displayed

# Actual #
the 'buggytox/lib/python-xx/site-packages' is diplayed


# Context #
I came across this issue trying to have my tests run with py.tests. I opted 
having the tests included in the package and I was trying to follow [manual 
instructions](http://tox.readthedocs.org/en/latest/example/pytest.html#known-issues-and-limitations).
 I was expecting the {envsitepackagesdir} substitution will point to the 
[testenv:xx] site-packages dir. Infact I got the parent context site-packages 
dir which basically will render the method proposed in the forementioned link 
useless 

The [test 
code](https://bitbucket.org/hpk42/tox/src/78ace40b78b55eb729dd95cc7028347b73689739/tests/test_z_cmdline.py?at=default#cl-629)
 here for {envsitepackagesdir} subt is also quite generic, just checks a path 
containing 'site-packages' is obtained.




_______________________________________________
pytest-commit mailing list
pytest-commit@python.org
http://mail.python.org/mailman/listinfo/pytest-commit

Reply via email to