From 8439698336af99c7728cc08bc8855e2499af3d12 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Sat, 19 May 2018 21:51:24 +0100 Subject: [PATCH] [Tox] Use platform independant toxworkdir instead of PWD The use of `{env:PWD}` is not available on Windows so switch to `{toxworkdir}` which is the directory where virtual environments are created and sub directories for packaging reside. --- tox.ini | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tox.ini b/tox.ini index 16e5bb0c5..afe8ab1f5 100644 --- a/tox.ini +++ b/tox.ini @@ -18,7 +18,7 @@ minversion=1.8 [testenv] install_command = pip install --ignore-installed {opts} {packages} passenv = DISPLAY PYTHONPATH -setenv = PYTHONPATH = {env:PWD}: +setenv = PYTHONPATH = {toxinidir}: sitepackages = True deps = twisted[tls] @@ -31,7 +31,7 @@ deps = mock slimit pillow -whitelist_externals = pytest +whitelist_externals = pytest bash commands = {envpython} setup.py test [pytest] @@ -54,21 +54,22 @@ commands = pytest -v --basetemp=_pytest_temp -s -m "gtkui" deluge/tests commands = pytest -v --basetemp=_pytest_temp -s -m "todo" deluge/tests [testenv:trial] -setenv = {[testenv]setenv}:{env:PWD}/deluge/tests +setenv = {[testenv]setenv}:{toxinidir}/deluge/tests commands = python -c "import libtorrent as lt; print lt.__version__" python -m twisted.trial --reporter=deluge-reporter deluge.tests [testenv:plugins] -setenv = PYTHONPATH = {env:PWD}:{env:PWD}/deluge/plugins +setenv = PYTHONPATH = {toxinidir}:{toxinidir}/deluge/plugins +whitelist_externals = bash commands = - python setup.py build_plugins --develop --install-dir={env:PWD}/deluge/plugins/ + python setup.py build_plugins --develop --install-dir={toxinidir}/deluge/plugins/ pytest -v --basetemp=_pytest_temp -s -m "not gtkui" deluge/plugins [testenv:pluginsgtkui] -setenv = PYTHONPATH = {env:PWD}:{env:PWD}/deluge/plugins +setenv = PYTHONPATH = {toxinidir}:{toxinidir}/deluge/plugins commands = - python setup.py build_plugins --develop --install-dir={env:PWD}/deluge/plugins/ + python setup.py build_plugins --develop --install-dir={toxinidir}/deluge/plugins/ pytest -v --basetemp=_pytest_temp -s deluge/plugins [testenv:py27]