use python3 in tox

Add a py27 environment to override the basepython value set in testenv
to ensure those tests still actually run under python 2.

Change-Id: I55c97908e95a7e1d5c15a16caf81fca13da215d9
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-08-14 13:14:17 -04:00
parent 4aea509345
commit 7183206ae6
1 changed files with 4 additions and 0 deletions

View File

@ -4,6 +4,7 @@ envlist = py27,pep8
skipsdist = True
[testenv]
basepython = python3
usedevelop = True
install_command = pip install {opts} {packages}
setenv =
@ -14,6 +15,9 @@ deps =
-r{toxinidir}/test-requirements.txt
commands = python setup.py test --slowest --testr-args='{posargs}'
[testenv:py27]
basepython = python2.7
[testenv:pep8]
commands = flake8 {posargs}