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: I5e57994077795bcc25861a081ef114fa97e01bef
This commit is contained in:
Vu Cong Tuan 2018-07-09 18:10:05 +07:00
parent c371d7a362
commit 3ba6be7f6c
5 changed files with 13 additions and 8 deletions

2
.gitignore vendored
View File

@ -16,5 +16,5 @@ doc/build
searchlightclient/versioninfo
*.egg-info
*.log
.testrepository
.stestr/
*.swp

3
.stestr.conf Normal file
View File

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

View File

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

View File

@ -7,5 +7,5 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD
mock>=2.0.0 # BSD
testrepository>=0.0.18 # Apache-2.0/BSD
stestr>=2.0.0 # Apache-2.0
testtools>=2.2.0 # MIT

10
tox.ini
View File

@ -12,7 +12,7 @@ deps =
-r{toxinidir}/test-requirements.txt
commands =
find . -type f -name "*.pyc" -delete
python setup.py testr --slowest --testr-args='{posargs}'
stestr run --slowest {posargs}
whitelist_externals = find
[testenv:pypy]
@ -39,7 +39,13 @@ passenv = OS_*
[testenv:cover]
basepython = python3
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:docs]
basepython = python3