diff --git a/test-requirements.txt b/test-requirements.txt index 600ce10..2403604 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -8,7 +8,8 @@ flake8-import-order==0.11 # LGPLv3 coverage!=4.4,>=4.0 # Apache-2.0 doc8>=0.6.0 # Apache-2.0 python-subunit>=1.0.0 # Apache-2.0/BSD -sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD +sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD +sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD oslotest>=3.2.0 # Apache-2.0 testscenarios>=0.4 # Apache-2.0/BSD testtools>=2.2.0 # MIT diff --git a/tox.ini b/tox.ini index ab9f0ec..14575bc 100644 --- a/tox.ini +++ b/tox.ini @@ -1,20 +1,22 @@ [tox] minversion = 1.8 skipsdist = True -envlist = py35,py27,pep8 +envlist = py3,py27,pep8 [testenv] usedevelop = True -install_command = pip install -U -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages} +install_command = pip install -U {opts} {packages} setenv = VIRTUAL_ENV={envdir} PYTHONDONTWRITEBYTECODE = 1 LANGUAGE=en_US LC_ALL=en_US.UTF-8 TESTS_DIR=./ironic_staging_drivers/tests/unit/ deps = + -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} -r{toxinidir}/test-requirements.txt -r{toxinidir}/extra-requirements.txt -commands = ostestr {posargs} +commands = + stestr run {posargs} passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY [testenv:pep8] @@ -29,11 +31,13 @@ commands = {posargs} [testenv:cover] basepython = python3 -setenv = {[testenv]setenv} - PYTHON=coverage run --source ironic_staging_drivers --omit='*tests*' --parallel-mode +setenv = + VIRTUAL_ENV={envdir} + LANGUAGE=en_US + PYTHON=coverage run --source ironic_staging_drivers --omit='*tests*' --parallel-mode commands = coverage erase - ostestr {posargs} + stestr run {posargs} coverage combine coverage report --omit='*tests*' coverage html -d ./cover --omit='*tests*'