From 9d13234e23bb6aeaa74f1df426288510ef17a166 Mon Sep 17 00:00:00 2001 From: bendikro Date: Thu, 14 Jan 2016 21:18:12 +0100 Subject: [PATCH] [Tests] Fix for flake8 in tox Force install flake8 in tox to avoid the system flake8 being used if available. Remove unneeded whitelist entries --- tox.ini | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/tox.ini b/tox.ini index 91b976e64..a81d917fa 100644 --- a/tox.ini +++ b/tox.ini @@ -60,7 +60,7 @@ commands = setenv = {[testenv]setenv}:{env:PWD}/deluge/tests whitelist_externals = trial commands = - trial --reporter=deluge-reporter deluge/tests + trial --reporter=deluge-reporter deluge/tests [testenv:plugins] commands = py.test deluge/plugins @@ -90,22 +90,19 @@ commands = python -c "import subprocess, sys; output = subprocess.check_output('isort -q --diff --recursive deluge docs packaging *.py', shell=True); print output; sys.exit(len(output) != 0)" [testenv:flake8] +# Force flake8 pip install as system flake8 uses hardcoded python path which imports the wrong libraries. +install_command = pip -v install --ignore-installed {opts} {packages} setenv = {[testenv]setenv} -whitelist_externals = - {[testenv]whitelist_externals} - flake8 deps = {[testenv]deps} flake8 pep8-naming -commands = flake8 +commands = + flake8 --version + flake8 [testenv:flake8-complexity] setenv = {[testenv]setenv} -whitelist_externals = - {[testenv]whitelist_externals} - flake8 - sh deps = {[testenv:flake8]deps} mccabe