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
|
||||
.testrepository/
|
||||
.stestr/
|
||||
.tox
|
||||
*.egg-info/
|
||||
*.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
|
||||
# required to build documentation
|
||||
sphinx>=1.6.2 # BSD
|
||||
testrepository>=0.0.18
|
||||
stestr>=1.1.0 # Apache-2.0
|
||||
testtools>=0.9.34
|
||||
mock
|
||||
coverage
|
||||
|
19
tox.ini
19
tox.ini
@ -12,8 +12,8 @@ setenv = VIRTUAL_ENV={envdir}
|
||||
LC_ALL=C
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
commands = /bin/rm -f .testrepository/times.dbm
|
||||
python setup.py testr --testr-args='{posargs}'
|
||||
commands =
|
||||
stestr --test-path ./refstack_client/tests/unit run {posargs}
|
||||
distribute = false
|
||||
|
||||
[testenv:pep8]
|
||||
@ -25,13 +25,14 @@ distribute = false
|
||||
commands = {posargs}
|
||||
|
||||
[testenv:cover]
|
||||
commands = coverage run \
|
||||
--include './refstack_client/*' \
|
||||
--omit './refstack_client/tests*' \
|
||||
-m testtools.run discover refstack_client.tests.unit
|
||||
coverage report
|
||||
coverage html -d cover
|
||||
/bin/rm .coverage
|
||||
commands =
|
||||
coverage erase
|
||||
find . -type f -name "*.pyc" -delete
|
||||
stestr --test-path ./refstack_client/tests run {posargs}
|
||||
coverage combine
|
||||
coverage html -d cover
|
||||
coverage xml -o cover/coverage.xml
|
||||
coverage report
|
||||
|
||||
[testenv:docs]
|
||||
commands = python setup.py build_sphinx {posargs}
|
||||
|
Loading…
Reference in New Issue
Block a user