Migrate from testr to stestr
* Replace .testr.conf by .stestr.conf for migration and update .gitignore and test-requirements.txt file accordingly * Use py3 as the default runtime for tox and 3.18.0 as the minversion for tox, replace whitelist_externals by allowlist_externals Change-Id: I7747c4ce8d95ce94e0750a3f964f0264fe491fce
This commit is contained in:
parent
32ef2538fc
commit
20d234bc37
1
.gitignore
vendored
1
.gitignore
vendored
@ -16,7 +16,6 @@ doc/build
|
||||
adjutantclient/versioninfo
|
||||
*.egg-info
|
||||
*.log
|
||||
.testrepository
|
||||
.pypirc
|
||||
env/
|
||||
*~
|
||||
|
3
.stestr.conf
Normal file
3
.stestr.conf
Normal file
@ -0,0 +1,3 @@
|
||||
[DEFAULT]
|
||||
test_path=./adjutantclient/tests/
|
||||
top_dir=./
|
@ -1,4 +0,0 @@
|
||||
[DEFAULT]
|
||||
test_command=${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./adjutantclient/tests} $LISTOPT $IDOPTION
|
||||
test_id_option=--load-list $IDFILE
|
||||
test_list_option=--list
|
@ -8,7 +8,7 @@ discover # BSD
|
||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||
requests-mock>=0.7.0 # Apache-2.0
|
||||
os-client-config>=1.13.1 # Apache-2.0
|
||||
testrepository>=0.0.18 # Apache-2.0/BSD
|
||||
stestr>=2.0.0 # Apache-2.0
|
||||
testscenarios>=0.4 # Apache-2.0/BSD
|
||||
testtools>=1.4.0 # MIT
|
||||
tempest>=11.0.0 # Apache-2.0
|
||||
|
17
tox.ini
17
tox.ini
@ -1,6 +1,6 @@
|
||||
[tox]
|
||||
minversion = 3.1
|
||||
envlist = py38
|
||||
minversion = 3.18.0
|
||||
envlist = py3
|
||||
skipsdist = True
|
||||
ignore_basepython_conflict = True
|
||||
|
||||
@ -15,18 +15,25 @@ deps =
|
||||
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
commands = ostestr {posargs}
|
||||
commands = stestr run --slowest {posargs}
|
||||
|
||||
whitelist_externals = find
|
||||
allowlist_externals = find
|
||||
|
||||
[testenv:pep8]
|
||||
commands = flake8
|
||||
|
||||
[testenv:cover]
|
||||
allowlist_externals = find
|
||||
setenv =
|
||||
{[testenv]setenv}
|
||||
PYTHON=coverage run --source adjutantclient --parallel-mode
|
||||
commands =
|
||||
coverage erase
|
||||
find . -type f -name "*.pyc" -delete
|
||||
python setup.py testr --coverage --testr-args='{posargs}'
|
||||
stestr run {posargs}
|
||||
coverage combine
|
||||
coverage html -d cover
|
||||
coverage xml -o cover/coverage.xml
|
||||
coverage report
|
||||
|
||||
[testenv:venv]
|
||||
|
Loading…
Reference in New Issue
Block a user