Merge "Use stestr as the test runner for unit tests"

This commit is contained in:
Zuul 2018-06-09 18:00:19 +00:00 committed by Gerrit Code Review
commit a88d70ea13
3 changed files with 7 additions and 19 deletions

View File

@ -12,6 +12,4 @@ testtools>=2.3.0 # MIT
os-testr>=1.0.0 # Apache-2.0
flake8>=3.3.0
mock
pytest==3.2.1
pytest-mock
responses>=0.8.1

View File

@ -1,15 +0,0 @@
#!/usr/bin/env bash
# Script for passing regex filtering of unit tests to py.test conditionally.
# Needed because tox currently doesn't support conditional logic like this.
posargs=$@
if [ ${#posargs} -ge 1 ]; then
py.test -vvv -s --ignore=hapi -k $1
else
py.test -vvv -s --ignore=hapi
fi
TEST_STATUS=$?
set -e
exit $TEST_STATUS

View File

@ -18,8 +18,13 @@ whitelist_externals =
rm
commands =
find . -type f -name "*.pyc" -delete
python -V
{toxinidir}/tools/run-unit-tests.sh {posargs}
rm -Rf .testrepository/times.dbm
[testenv:py35]
commands =
{[testenv]commands}
stestr run {posargs}
stestr slowest
[testenv:docs]
deps = -r{toxinidir}/doc/requirements.txt