Migrate from testr to stestr

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I9dd3a3db55fdd01d46cb7a204be46f7c5f260c4e
This commit is contained in:
Stephen Finucane 2021-02-10 14:53:47 +00:00
parent c3bda9eeb1
commit e2dd407c76
5 changed files with 30 additions and 42 deletions

27
.gitignore vendored
View File

@ -1,8 +1,5 @@
*.py[cod] *.py[cod]
# C extensions
*.so
# Packages # Packages
*.egg *.egg
*.egg-info *.egg-info
@ -18,30 +15,12 @@ develop-eggs
lib lib
lib64 lib64
# Installer logs
pip-log.txt
# Unit test / coverage reports # Unit test / coverage reports
.coverage .coverage
cover cover
.tox .tox
nosetests.xml
.testrepository .testrepository
.stestr
# Translations
*.mo
# Mr Developer
.mr.developer.cfg
.project
.pydevproject
#IntelJ Idea
.idea/
# Complexity
output/*.html
output/*/index.html
# Sphinx # Sphinx
doc/build doc/build
@ -50,9 +29,5 @@ doc/build
AUTHORS AUTHORS
ChangeLog ChangeLog
# Editors
*~
.*.swp
# Files created by releasenotes build # Files created by releasenotes build
releasenotes/build releasenotes/build

3
.stestr.conf Normal file
View File

@ -0,0 +1,3 @@
[DEFAULT]
test_path=./yaql/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

@ -2,7 +2,5 @@ hacking>=3.0.1,<3.1.0 # Apache-2.0
coverage>=3.6 coverage>=3.6
fixtures>=1.3.1 fixtures>=1.3.1
python-subunit>=0.0.18
testrepository>=0.0.18
testscenarios>=0.4
testtools>=1.4.0 testtools>=1.4.0
stestr>=2.0.0 # Apache-2.0

31
tox.ini
View File

@ -7,9 +7,19 @@ ignore_basepython_conflict = True
[testenv] [testenv]
basepython = python3 basepython = python3
usedevelop = True usedevelop = True
deps = -r{toxinidir}/requirements.txt setenv =
-r{toxinidir}/test-requirements.txt LANGUAGE=en_US
commands = python setup.py testr --slowest --testr-args='{posargs}' LC_ALL=en_US.utf-8
OS_STDOUT_CAPTURE=1
OS_STDERR_CAPTURE=1
OS_TEST_TIMEOUT=60
PYTHONDONTWRITEBYTECODE=1
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
stestr run {posargs}
stestr slowest
[testenv:pep8] [testenv:pep8]
commands = flake8 commands = flake8
@ -18,14 +28,23 @@ commands = flake8
commands = {posargs} commands = {posargs}
[testenv:cover] [testenv:cover]
commands = python setup.py testr --coverage --testr-args='{posargs}' setenv =
{[testenv]setenv}
PYTHON=coverage run --source yaql --parallel-mode
commands =
coverage erase
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report
[testenv:docs] [testenv:docs]
deps = -r{toxinidir}/doc/requirements.txt deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html commands = sphinx-build -a -E -W -b html doc/source doc/build/html
[testenv:releasenotes] [testenv:releasenotes]
commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html commands = sphinx-build -a -E -b html releasenotes/source releasenotes/build/html
[flake8] [flake8]
# H803 skipped on purpose per list discussion. # H803 skipped on purpose per list discussion.