Switch to stestr for running unit tests
* As stestr is the successor of testr, it's time to switch to stestr for running refstack unit tests. Change-Id: I3b9c0e2b4363dec24bad43bf5cfbeef4ecc7a37c
This commit is contained in:
parent
d8ff820765
commit
d159cc379e
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,5 +1,5 @@
|
|||||||
*.pyc
|
*.pyc
|
||||||
.testrepository/
|
.stestr/
|
||||||
.tox
|
.tox
|
||||||
*.egg-info/
|
*.egg-info/
|
||||||
*.egg
|
*.egg
|
||||||
|
3
.stestr.conf
Normal file
3
.stestr.conf
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[DEFAULT]
|
||||||
|
test_path=./refstack_client/tests/unit
|
||||||
|
top_dir=./
|
@ -1,4 +0,0 @@
|
|||||||
[DEFAULT]
|
|
||||||
test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 coverage run -m subunit.run discover -t ./ -s ./refstack_client/tests/unit $LISTOPT $IDOPTION
|
|
||||||
test_id_option=--load-list $IDFILE
|
|
||||||
test_list_option=--list
|
|
@ -4,7 +4,7 @@ flake8==2.0
|
|||||||
docutils>=0.11 # OSI-Approved Open Source, Public Domain
|
docutils>=0.11 # OSI-Approved Open Source, Public Domain
|
||||||
# required to build documentation
|
# required to build documentation
|
||||||
sphinx>=1.6.2 # BSD
|
sphinx>=1.6.2 # BSD
|
||||||
testrepository>=0.0.18
|
stestr>=1.1.0 # Apache-2.0
|
||||||
testtools>=0.9.34
|
testtools>=0.9.34
|
||||||
mock
|
mock
|
||||||
coverage
|
coverage
|
||||||
|
17
tox.ini
17
tox.ini
@ -12,8 +12,8 @@ setenv = VIRTUAL_ENV={envdir}
|
|||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
deps = -r{toxinidir}/requirements.txt
|
deps = -r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
commands = /bin/rm -f .testrepository/times.dbm
|
commands =
|
||||||
python setup.py testr --testr-args='{posargs}'
|
stestr --test-path ./refstack_client/tests/unit run {posargs}
|
||||||
distribute = false
|
distribute = false
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
@ -25,13 +25,14 @@ distribute = false
|
|||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
commands = coverage run \
|
commands =
|
||||||
--include './refstack_client/*' \
|
coverage erase
|
||||||
--omit './refstack_client/tests*' \
|
find . -type f -name "*.pyc" -delete
|
||||||
-m testtools.run discover refstack_client.tests.unit
|
stestr --test-path ./refstack_client/tests run {posargs}
|
||||||
coverage report
|
coverage combine
|
||||||
coverage html -d cover
|
coverage html -d cover
|
||||||
/bin/rm .coverage
|
coverage xml -o cover/coverage.xml
|
||||||
|
coverage report
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
commands = python setup.py build_sphinx {posargs}
|
commands = python setup.py build_sphinx {posargs}
|
||||||
|
Loading…
Reference in New Issue
Block a user