Switch to use stestr for unit test
According to Openstack summit session [1], stestr is maintained project to which all Openstack projects should migrate. So we should switch to stestr. [1] https://etherpad.openstack.org/p/YVR-python-pti Change-Id: Iee13deb54056e1c81d3732cb51a61c68481607fa
This commit is contained in:
parent
15e65aec62
commit
42379399a2
|
@ -8,7 +8,7 @@ build
|
||||||
cover
|
cover
|
||||||
htmlcov
|
htmlcov
|
||||||
.secret_key_store
|
.secret_key_store
|
||||||
.testrepository
|
.stestr/
|
||||||
.venv
|
.venv
|
||||||
dist
|
dist
|
||||||
*.egg
|
*.egg
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
[DEFAULT]
|
||||||
|
test_path=./cloudkittydashboard/tests
|
||||||
|
top_dir=./
|
|
@ -1,4 +0,0 @@
|
||||||
[DEFAULT]
|
|
||||||
test_command=${PYTHON:-python} -m subunit.run discover -t ./ ./cloudkittydashboard/tests $LISTOPT $IDOPTION
|
|
||||||
test_id_option=--load-list $IDFILE
|
|
||||||
test_list_option=--list
|
|
|
@ -9,7 +9,7 @@ python-subunit>=0.0.18
|
||||||
sphinx>=1.6.2 # BSD
|
sphinx>=1.6.2 # BSD
|
||||||
openstackdocstheme>=1.11.0 # Apache-2.0
|
openstackdocstheme>=1.11.0 # Apache-2.0
|
||||||
oslotest>=1.10.0 # Apache-2.0
|
oslotest>=1.10.0 # Apache-2.0
|
||||||
testrepository>=0.0.18
|
stestr>=2.0.0 # Apache-2.0
|
||||||
testscenarios>=0.4
|
testscenarios>=0.4
|
||||||
testtools>=1.4.0
|
testtools>=1.4.0
|
||||||
reno>=1.8.0 # Apache2
|
reno>=1.8.0 # Apache2
|
||||||
|
|
11
tox.ini
11
tox.ini
|
@ -10,7 +10,7 @@ setenv =
|
||||||
VIRTUAL_ENV={envdir}
|
VIRTUAL_ENV={envdir}
|
||||||
deps = -r{toxinidir}/requirements.txt
|
deps = -r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
commands = python setup.py testr --slowest --testr-args='{posargs}'
|
commands = stestr run --slowest {posargs}
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
commands = flake8
|
commands = flake8
|
||||||
|
@ -19,7 +19,14 @@ commands = flake8
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
commands = python setup.py testr --coverage --testr-args='{posargs}'
|
setenv =
|
||||||
|
{[testenv]setenv}
|
||||||
|
PYTHON=coverage run --source cloudkittydashboard --parallel-mode
|
||||||
|
commands =
|
||||||
|
stestr run {posargs}
|
||||||
|
coverage combine
|
||||||
|
coverage html -d cover
|
||||||
|
coverage xml -o cover/coverage.xml
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
commands = python setup.py build_sphinx
|
commands = python setup.py build_sphinx
|
||||||
|
|
Loading…
Reference in New Issue