Migrate to stestr

ostestr has already updated to stestr. Update the files here to make
sure it works properly.

Change-Id: I172cbb158f728a74bcb976fa68b78c28589eaa0c
This commit is contained in:
Monty Taylor 2017-09-20 15:46:45 -05:00
parent ff165110f8
commit ea3bfb1beb
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
6 changed files with 17 additions and 10 deletions

1
.gitignore vendored
View File

@ -1,5 +1,6 @@
.coverage .coverage
.testrepository .testrepository
.stestr
subunit.log subunit.log
.venv .venv
*,cover *,cover

3
.stestr.conf Normal file
View File

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

View File

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

View File

@ -15,10 +15,10 @@ exceptions to an instance or subclass of ClientException.
Testing Testing
======= =======
keystoneauth uses testtools and testr for its unittest suite keystoneauth uses testtools and stestr for its unittest suite
and its test runner. Basic workflow around our use of tox and testr can and its test runner. Basic workflow around our use of tox and stestr can
be found at https://wiki.openstack.org/testr. If you'd like to learn more be found at https://wiki.openstack.org/testr. If you'd like to learn more
in depth: in depth:
https://testtools.readthedocs.org/ https://testtools.readthedocs.io/en/latest/
https://testrepository.readthedocs.org/ https://stestr.readthedocs.io/en/latest/

View File

@ -18,7 +18,7 @@ betamax>=0.7.0 # Apache-2.0
reno>=2.5.0 # Apache-2.0 reno>=2.5.0 # Apache-2.0
requests-mock>=1.1.0 # Apache-2.0 requests-mock>=1.1.0 # Apache-2.0
sphinx>=1.6.2 # BSD sphinx>=1.6.2 # BSD
testrepository>=0.0.18 # Apache-2.0/BSD stestr>=1.0.0 # Apache-2.0
testresources>=0.2.4 # Apache-2.0/BSD testresources>=0.2.4 # Apache-2.0/BSD
testtools>=1.4.0 # MIT testtools>=1.4.0 # MIT
PyYAML>=3.10 # MIT PyYAML>=3.10 # MIT

View File

@ -36,7 +36,14 @@ commands = bandit -r keystoneauth1 -x tests -s B110,B410
commands = {posargs} commands = {posargs}
[testenv:cover] [testenv:cover]
commands = python setup.py testr --coverage --testr-args='{posargs}' setenv =
{[testenv]setenv}
PYTHON=coverage run --source keystoneauth1 --parallel-mode
commands =
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:debug] [testenv:debug]
commands = oslo_debug_helper -t keystoneauth1/tests {posargs} commands = oslo_debug_helper -t keystoneauth1/tests {posargs}