Switch to using stestr for tests

OpenStack is switching from testrepository to stestr. Make the shift
here.

Also, while doing this, update the rest of the test-requirements.
testtools and python-subunit are removed because they are transitive
deps of oslotest and stestr already.

Change-Id: Idf1298e03a78653044532fd54a4f35dcf5c6c1c5
This commit is contained in:
Monty Taylor 2018-03-22 12:59:31 -05:00
parent 46ad47ecd9
commit 45f7ed5a43
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
3 changed files with 13 additions and 25 deletions

View File

@ -1,8 +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 storyboard/tests $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

View File

@ -1,12 +1,9 @@
hacking>=1.0.0,<1.1.0
coverage>=3.6
fixtures>=0.3.14
mock>=1.0
python-subunit
oslotest>=1.2.0
os-testr>=1.0.0
testrepository>=0.0.18
coverage!=4.4,>=4.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD
mock>=2.0 # BSD
oslotest>=3.2.0 # Apache-2.0
stestr>=1.0.0 # Apache-2.0
testscenarios>=0.4,<0.5
testtools>=0.9.34
posix_ipc>=0.9.8

17
tox.ini
View File

@ -6,24 +6,23 @@ envlist = py35,py27,pep8
[testenv]
usedevelop = True
install_command = pip install -U {opts} {packages}
passenv = OS_* STORYBOARD_*
setenv =
VIRTUAL_ENV={envdir}
OS_STDERR_CAPTURE=1
OS_STDOUT_CAPTURE=1
passenv =
OS_TEST_TIMEOUT
STORYBOARD_TEST_DB
OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = ostestr '{posargs}'
commands = stestr run {posargs}
stestr slowest
whitelist_externals = bash
[testenv:sqlite]
basepython = python3
setenv =
{[testenv]setenv}
STORYBOARD_TEST_DB=sqlite:///{envtmpdir}
OS_STDERR_CAPTURE=1
OS_STDOUT_CAPTURE=1
[testenv:pep8]
basepython = python3
@ -44,7 +43,7 @@ commands =
[testenv:cover]
basepython = python3
setenv =
VIRTUAL_ENV={envdir}
{[testenv]setenv}
PYTHON=coverage run --source storyboard --parallel-mode
commands =
stestr run {posargs}