diff --git a/.gitignore b/.gitignore index a672aea..9437483 100644 --- a/.gitignore +++ b/.gitignore @@ -25,7 +25,7 @@ pip-log.txt .coverage .tox nosetests.xml -.testrepository +.stestr/ .venv # Translations diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 0000000..daf731d --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_path=./vitrage_dashboard/dashboard/tests/ +top_dir=./ \ No newline at end of file diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index 6d83b3c..0000000 --- a/.testr.conf +++ /dev/null @@ -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 diff --git a/test-requirements.txt b/test-requirements.txt index 7509d70..f1e3320 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -7,7 +7,7 @@ hacking>=3.0.1,<3.1.0 # Apache-2.0 coverage>=3.6 python-subunit>=0.0.18 nodeenv>=0.9.4 # BSD -testrepository>=0.0.18 +stestr>=2.0.0 # Apache-2.0 testscenarios>=0.4 testtools>=1.4.0 pytest>=5.3.5 # MIT diff --git a/tox.ini b/tox.ini index e555016..e57df1d 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -minversion = 2.3.2 +minversion = 3.18.0 envlist = py3,pep8,npm skipsdist = True ignore_basepython_conflict = True @@ -54,7 +54,18 @@ deps = commands = {posargs} [testenv:cover] -commands = python setup.py test --coverage --testr-args='{posargs}' +allowlist_externals = find +setenv = + PYTHON=coverage run --source vitrage-dashboard --parallel-mode +commands = + coverage erase + find . -type f -name "*.pyc" -delete + stestr run {posargs} + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml + coverage report + [testenv:docs] deps = -r{toxinidir}/doc/requirements.txt