Migrate to stestr

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

Change-Id: I172cbb158f728a74bcb976fa68b78c28589eaa0c
changes/03/505803/1
Monty Taylor 5 years ago
parent ff165110f8
commit ea3bfb1beb
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
  1. 1
      .gitignore
  2. 3
      .stestr.conf
  3. 4
      .testr.conf
  4. 8
      HACKING.rst
  5. 2
      test-requirements.txt
  6. 9
      tox.ini

1
.gitignore vendored

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

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

@ -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

@ -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/

@ -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

@ -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}

Loading…
Cancel
Save