Switch to using stestr

stestr is maintained project to which all Openstack projects
should migrate.

[1] https://etherpad.openstack.org/p/YVR-python-pti
[2] https://governance.openstack.org/tc/reference/pti/python.html

Change-Id: Icc11037bd56a75a8d9abbdfda10a832437502565
This commit is contained in:
Nguyen Hai 2018-06-07 17:57:32 +09:00
parent 4ebb371e35
commit e8b1634d8f
6 changed files with 17 additions and 11 deletions

1
.gitignore vendored
View File

@ -20,6 +20,7 @@ run_tests.log
.idea/
.tox/
.venv/
.stestr/
# Files created by releasenotes build
releasenotes/build

3
.stestr.conf Normal file
View File

@ -0,0 +1,3 @@
[DEFAULT]
test_path=./tackerclient/tests/unit
top_path=./

View File

@ -1,4 +0,0 @@
[DEFAULT]
test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./tackerclient/tests/unit} $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

View File

@ -53,8 +53,8 @@ requestsexceptions==1.2.0
rfc3986==0.3.1
simplejson==3.5.1
six==1.10.0
stestr==2.0.0
stevedore==1.20.0
testrepository==0.0.18
testtools==2.2.0
traceback2==1.4.0
unittest2==1.1.0

View File

@ -5,6 +5,6 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD
python-subunit>=1.0.0 # Apache-2.0/BSD
testrepository>=0.0.18 # Apache-2.0/BSD
stestr>=2.0.0 # Apache-2.0
testtools>=2.2.0 # MIT
mock>=2.0.0 # BSD

16
tox.ini
View File

@ -11,10 +11,10 @@ setenv = VIRTUAL_ENV={envdir}
usedevelop = True
install_command = pip install {opts} {packages}
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = python setup.py testr --testr-args='{posargs}'
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = stestr run --slowest {posargs}
[testenv:pep8]
commands = flake8
@ -32,7 +32,13 @@ deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:cover]
commands = python setup.py testr --coverage --testr-args='{posargs}'
setenv =
PYTHON=coverage run --source tackerclient --parallel-mode
commands =
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[flake8]
# E125 continuation line does not distinguish itself from next logical line