Stop configuring install_command in tox.

Currently, we are overriding 'install_command' to use 'pip'. This is
considered poor behavior and 'python -m pip' should be used instead:

https://snarky.ca/why-you-should-use-python-m-pip/

It turns out that this is the the default value provided by tox:

https://tox.readthedocs.io/en/latest/config.html#conf-install_command

So we can remove the line and simply use the default value.

Also these changes introduce a new explicit env var related to eventlet
testing to avoid misunderstand.

Change-Id: I03b9b179c4cb6ea5a9a8d8c74af3502a0243ace6
This commit is contained in:
Hervé Beraud 2020-01-15 09:51:30 +01:00
parent fc21061460
commit 485fe226ec

View File

@ -5,7 +5,6 @@ ignore_basepython_conflict = True
[testenv]
basepython = python3
install_command = pip install {opts} {packages}
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt
@ -13,7 +12,7 @@ deps =
# We want to support both vanilla stdlib and eventlet monkey patched
whitelist_externals = env
commands =
lockutils-wrapper stestr run --slowest {posargs}
env TEST_EVENTLET=0 lockutils-wrapper stestr run --slowest {posargs}
env TEST_EVENTLET=1 lockutils-wrapper stestr run --slowest {posargs}
[testenv:pep8]