Use os-testr and add PY35 support

python-masakariclient should use os-testr instead of testr as
it is more powerful and provide much prettier output than testr.

This patch also disables the use of PY34 and adds PY35 for in tox
as the gating on python 3.4 is restricted to <= Mitaka in OpenStack.
This is due to the change from Ubuntu Trusty to Xenial, where only
python3.5 is available.

Change-Id: I1029be8dedd8d4530586c2b4b852c7ddc1d03cf7
This commit is contained in:
Dinesh Bhor 2017-07-26 12:33:52 +05:30
parent 445aab9cdb
commit 7e21abfc1d
3 changed files with 29 additions and 7 deletions

View File

@ -16,8 +16,7 @@ classifier =
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.3
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
[files]
packages =

View File

@ -9,6 +9,7 @@ python-subunit>=0.0.18 # Apache-2.0/BSD
sphinx>=1.2.1,!=1.3b1,<1.4 # BSD
oslosphinx>=4.7.0 # Apache-2.0
oslotest>=1.10.0 # Apache-2.0
os-testr>=0.8.0 # Apache-2.0
testrepository>=0.0.18 # Apache-2.0/BSD
testscenarios>=0.4 # Apache-2.0/BSD
testtools>=1.4.0 # MIT

32
tox.ini
View File

@ -1,16 +1,38 @@
[tox]
minversion = 2.0
envlist = py34,py27,pypy,pep8
envlist = py35,py27,pypy,pep8
skipsdist = True
[testenv]
usedevelop = True
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
PYTHONWARNINGS=default::DeprecationWarning
setenv = VIRTUAL_ENV={envdir}
OS_TEST_PATH=./masakariclient/tests/unit
LANGUAGE=en_US
LC_ALL=en_US.utf-8
deps = -r{toxinidir}/test-requirements.txt
commands = python setup.py test --slowest --testr-args='{posargs}'
whitelist_externals = bash
find
rm
env
# By default ostestr will set concurrency
# to ncpu, to specify something else use
# the concurrency=<n> option.
# call ie: 'tox -epy27 -- --concurrency=4'
commands =
find . -type f -name "*.pyc" -delete
rm -Rf .testrepository/times.dbm
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY OS_DEBUG GENERATE_HASHES
[testenv:py27]
commands =
{[testenv]commands}
ostestr '{posargs}'
[testenv:py35]
commands =
{[testenv]commands}
ostestr '{posargs}'
[testenv:pep8]
commands = flake8 {posargs}