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: I14ae3879465e622f36fd7bba3f04cb6e0cb7500e
This commit is contained in:
parent
d6f8cda665
commit
97aec93e2b
2
.gitignore
vendored
2
.gitignore
vendored
@ -3,7 +3,7 @@
|
|||||||
build
|
build
|
||||||
dist
|
dist
|
||||||
heat_cfntools.egg-info/
|
heat_cfntools.egg-info/
|
||||||
.testrepository/
|
.stestr/
|
||||||
subunit.log
|
subunit.log
|
||||||
.tox
|
.tox
|
||||||
AUTHORS
|
AUTHORS
|
||||||
|
3
.stestr.conf
Normal file
3
.stestr.conf
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[DEFAULT]
|
||||||
|
test_path=./heat_cfntools/tests
|
||||||
|
top_dir=./
|
@ -1,4 +0,0 @@
|
|||||||
[DEFAULT]
|
|
||||||
test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_TEST_TIMEOUT=60 ${PYTHON:-python} -m subunit.run discover -t ./ ./heat_cfntools/tests $LISTOPT $IDOPTION
|
|
||||||
test_id_option=--load-list $IDFILE
|
|
||||||
test_list_option=--list
|
|
@ -4,5 +4,5 @@ mock==1.0
|
|||||||
pbr==0.8
|
pbr==0.8
|
||||||
psutil==1.1.1
|
psutil==1.1.1
|
||||||
six==1.9.0
|
six==1.9.0
|
||||||
testrepository==0.0.18
|
stestr==2.0.0
|
||||||
testtools==0.9.34
|
testtools==0.9.34
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
hacking>=0.9.0
|
hacking>=0.9.0
|
||||||
mock>=1.0
|
mock>=1.0
|
||||||
testrepository>=0.0.18
|
stestr>=2.0.0
|
||||||
testtools>=0.9.34
|
testtools>=0.9.34
|
||||||
|
10
tox.ini
10
tox.ini
@ -6,7 +6,7 @@ setenv = VIRTUAL_ENV={envdir}
|
|||||||
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
||||||
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]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
@ -21,8 +21,14 @@ commands = bash tools/lintstack.sh
|
|||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
|
setenv =
|
||||||
|
{[testenv]setenv}
|
||||||
|
PYTHON=coverage run --source heat_cfntools --parallel-mode
|
||||||
commands =
|
commands =
|
||||||
python setup.py testr --coverage --testr-args='{posargs}'
|
stestr run {posargs}
|
||||||
|
coverage combine
|
||||||
|
coverage html -d cover
|
||||||
|
coverage xml -o cover/coverage.xml
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
|
Loading…
Reference in New Issue
Block a user