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: Ie84d18b0bcc2a33587bd72204c0eb3dad687be7e
This commit is contained in:
Vu Cong Tuan 2018-07-09 13:30:30 +07:00
parent 858f15d9e3
commit d3165af5b9
6 changed files with 17 additions and 15 deletions

3
.gitignore vendored
View File

@ -24,8 +24,7 @@ pip-log.txt
# Unit test / coverage reports # Unit test / coverage reports
.coverage .coverage
.tox .tox
nosetests.xml .stestr/
.testrepository
.venv .venv
# Translations # Translations

3
.stestr.conf Normal file
View File

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

View File

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

View File

@ -8,6 +8,7 @@ dulwich==0.15.0
extras==1.0.0 extras==1.0.0
fixtures==3.0.0 fixtures==3.0.0
flake8==2.2.4 flake8==2.2.4
funcsigs==1.0.0
hacking==0.10.3 hacking==0.10.3
imagesize==0.7.1 imagesize==0.7.1
Jinja2==2.10 Jinja2==2.10
@ -31,7 +32,7 @@ snowballstemmer==1.2.1
Sphinx==1.6.5 Sphinx==1.6.5
sphinxcontrib-websupport==1.0.1 sphinxcontrib-websupport==1.0.1
stevedore==1.20.0 stevedore==1.20.0
testrepository==0.0.18 stestr==2.0.0
testtools==2.2.0 testtools==2.2.0
traceback2==1.4.0 traceback2==1.4.0
unittest2==1.1.0 unittest2==1.1.0

View File

@ -6,9 +6,9 @@ hacking<0.11,>=0.10.0
coverage!=4.4,>=4.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0
python-subunit>=1.0.0 # Apache-2.0/BSD python-subunit>=1.0.0 # Apache-2.0/BSD
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD sphinx!=1.6.6,!=1.6.7,>=1.6.5 # BSD
openstackdocstheme>=1.18.1 # Apache-2.0 openstackdocstheme>=1.18.1 # Apache-2.0
testrepository>=0.0.18 # Apache-2.0/BSD stestr>=2.0.0 # Apache-2.0
testtools>=2.2.0 # MIT testtools>=2.2.0 # MIT
fixtures>=3.0.0 # Apache-2.0/BSD fixtures>=3.0.0 # Apache-2.0/BSD
doc8>=0.6.0 # Apache-2.0 doc8>=0.6.0 # Apache-2.0

12
tox.ini
View File

@ -12,7 +12,7 @@ deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt -r{toxinidir}/requirements.txt
commands = python setup.py testr --slowest --testr-args='{posargs}' commands = stestr run --slowest {posargs}
[testenv:debug] [testenv:debug]
basepython = python3 basepython = python3
@ -32,7 +32,13 @@ commands = {posargs}
[testenv:cover] [testenv:cover]
basepython = python3 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] [testenv:docs]
basepython = python3 basepython = python3
@ -41,7 +47,7 @@ commands = python setup.py build_sphinx
[testenv:py27] [testenv:py27]
basepython = python2.7 basepython = python2.7
commands = commands =
python setup.py testr --slowest --testr-args='{posargs}' stestr run --slowest {posargs}
sphinx-build -b doctest doc/source doc/build sphinx-build -b doctest doc/source doc/build
doc8 --ignore-path "doc/source/history.rst" doc/source doc8 --ignore-path "doc/source/history.rst" doc/source