Use stestr as a test runner in tox

This commit makes stackviz use stestr as a test runner in tox.

Change-Id: Ic9e2f21fa91d9375e2020506f08ecece16706f07
changes/08/656708/2
Masayuki Igawa 4 years ago
parent 906cb6b809
commit cf87b63aec
No known key found for this signature in database
GPG Key ID: 290F53EDC899BF89

2
.gitignore vendored

@ -34,7 +34,7 @@ cover/
!.coveragerc
.tox
nosetests.xml
.testrepository
.stestr/
.venv
# Translations

@ -0,0 +1,3 @@
[DEFAULT]
test_path=./stackviz/tests
group_regex=([^\.]*\.)*

@ -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

@ -4,12 +4,20 @@ envlist = py36,py37,py27,pypy,pep8
skipsdist = True
[testenv]
setenv =
VIRTUAL_ENV={envdir}
OS_LOG_CAPTURE=1
OS_STDOUT_CAPTURE=1
OS_STDERR_CAPTURE=1
OS_TEST_TIMEOUT=160
passenv = OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_TEST_TIMEOUT OS_TEST_LOCK_PATH http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY ZUUL_CACHE_DIR REQUIREMENTS_PIP_LOCATION
usedevelop = True
install_command = pip install -U {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
whitelist_externals = *
deps = -r{toxinidir}/test-requirements.txt
commands = python setup.py test --slowest --testr-args='{posargs}'
commands =
find . -type f -name "*.pyc" -delete
stestr --test-path ./stackviz/tests run {posargs}
[testenv:pep8]
basepython = python3

Loading…
Cancel
Save