Switch to stestr

According to Openstack summit session [1],
stestr is maintained project to which all Openstack projects should migrate.
Let's switch to stestr as other projects have already moved to it.

[1] https://etherpad.openstack.org/p/YVR-python-pti

Change-Id: I2ee7c8a4f5cd91e77ddeccc84354dedf6e7e9196
This commit is contained in:
Vu Cong Tuan 2018-07-05 09:36:37 +07:00
parent 4f2a40fc80
commit 86a89fc21a
5 changed files with 13 additions and 8 deletions

2
.gitignore vendored
View File

@ -15,6 +15,6 @@ doc/source/api/
*.egg
.autogenerated
.coverage
.testrepository/
.stestr/
.tox/
.idea

3
.stestr.conf Normal file
View File

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

View File

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

View File

@ -10,5 +10,5 @@ mock>=2.0 # BSD
python-subunit>=0.0.18 # Apache-2.0/BSD
sphinx>=1.5.1 # BSD
sphinxcontrib-httpdomain # BSD
testrepository>=0.0.18 # Apache-2.0/BSD
stestr>=2.0.0 # Apache-2.0
testtools>=1.4.0 # MIT

10
tox.ini
View File

@ -9,7 +9,7 @@ install_command = pip install -U {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/test-requirements.txt
commands = python setup.py test --slowest --testr-args='{posargs}'
commands = stestr run --slowest {posargs}
[testenv:pep8]
commands = flake8
@ -18,7 +18,13 @@ commands = flake8
commands = {posargs}
[testenv:cover]
commands = python setup.py testr --coverage --testr-args='{posargs}'
setenv =
PYTHON=coverage run --source $project --parallel-mode
commands =
stestr run '{posargs}'
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:genconfig]
commands =