diff --git a/.gitignore b/.gitignore index efde447..ec8cee7 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,7 @@ build cover htmlcov .secret_key_store -.testrepository +.stestr/ .venv dist *.egg diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 0000000..a32c660 --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_path=./cloudkittydashboard/tests +top_dir=./ diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index f8ada83..0000000 --- a/.testr.conf +++ /dev/null @@ -1,4 +0,0 @@ -[DEFAULT] -test_command=${PYTHON:-python} -m subunit.run discover -t ./ ./cloudkittydashboard/tests $LISTOPT $IDOPTION -test_id_option=--load-list $IDFILE -test_list_option=--list diff --git a/test-requirements.txt b/test-requirements.txt index 2fe8929..2b3b23f 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -9,7 +9,7 @@ python-subunit>=0.0.18 sphinx>=1.6.2 # BSD openstackdocstheme>=1.11.0 # Apache-2.0 oslotest>=1.10.0 # Apache-2.0 -testrepository>=0.0.18 +stestr>=2.0.0 # Apache-2.0 testscenarios>=0.4 testtools>=1.4.0 reno>=1.8.0 # Apache2 diff --git a/tox.ini b/tox.ini index c293c28..99ea147 100644 --- a/tox.ini +++ b/tox.ini @@ -10,7 +10,7 @@ setenv = VIRTUAL_ENV={envdir} deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -commands = python setup.py testr --slowest --testr-args='{posargs}' +commands = stestr run --slowest {posargs} [testenv:pep8] commands = flake8 @@ -19,7 +19,14 @@ commands = flake8 commands = {posargs} [testenv:cover] -commands = python setup.py testr --coverage --testr-args='{posargs}' +setenv = + {[testenv]setenv} + PYTHON=coverage run --source cloudkittydashboard --parallel-mode +commands = + stestr run {posargs} + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml [testenv:docs] commands = python setup.py build_sphinx