Merge "Switch to use stestr for unit test"

This commit is contained in:
Zuul 2018-11-02 15:49:03 +00:00 committed by Gerrit Code Review
commit 174ad85e15
6 changed files with 18 additions and 15 deletions

2
.gitignore vendored
View File

@ -26,7 +26,7 @@ pip-log.txt
.coverage*
.tox
nosetests.xml
.testrepository
.stestr/
.venv
# Translations

3
.stestr.conf Normal file
View File

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

View File

@ -1,7 +0,0 @@
[DEFAULT]
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

View File

@ -1,5 +1,6 @@
Sphinx==1.6.1
docutils==0.11
dulwich==0.15.0
PyYAML==3.10.0
six==1.9.0
dulwich==0.15.0
Sphinx==1.6.1
stestr==2.0.0

View File

@ -6,9 +6,9 @@ hacking>=0.12.0,!=0.13.0,<0.14 # Apache-2.0
mock>=1.2
coverage>=3.6
coverage!=4.4,>=4.0 # Apache-2.0
python-subunit>=0.0.18
openstackdocstheme>=1.11.0 # Apache-2.0
testrepository>=0.0.18
stestr>=2.0.0 # Apache-2.0
testscenarios>=0.4
testtools>=1.4.0

12
tox.ini
View File

@ -11,8 +11,7 @@ deps =
-r{toxinidir}/test-requirements.txt
.[sphinx]
commands =
python setup.py test --slowest --coverage --coverage-package-name=reno --testr-args='{posargs}'
coverage report --show-missing
stestr run --slowest {posargs}
[testenv:pep8]
basepython = python3
@ -32,7 +31,14 @@ commands = {posargs}
[testenv:cover]
basepython = python3
commands = python setup.py test --coverage --testr-args='{posargs}'
setenv =
{[testenv]setenv}
PYTHON=coverage run --source reno --parallel-mode
commands =
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:docs]
# NOTE(dhellmann): Build our own documentation using the