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
.testrepository
.stestr
subunit.log
.venv
*,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
=======
keystoneauth uses testtools and testr for its unittest suite
and its test runner. Basic workflow around our use of tox and testr can
keystoneauth uses testtools and stestr for its unittest suite
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
in depth:
https://testtools.readthedocs.org/
https://testrepository.readthedocs.org/
https://testtools.readthedocs.io/en/latest/
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
requests-mock>=1.1.0 # Apache-2.0
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
testtools>=1.4.0 # MIT
PyYAML>=3.10 # MIT

View File

@ -36,7 +36,14 @@ commands = bandit -r keystoneauth1 -x tests -s B110,B410
commands = {posargs}
[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]
commands = oslo_debug_helper -t keystoneauth1/tests {posargs}