diff --git a/.gitignore b/.gitignore index 161c8b7..f851eff 100644 --- a/.gitignore +++ b/.gitignore @@ -24,9 +24,8 @@ pip-log.txt # Unit test / coverage reports .coverage cover -.testrepository +.stestr/ .tox -nosetests.xml # Translations *.mo diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 0000000..7e7d325 --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,4 @@ +[DEFAULT] +test_path=./os_refresh_config/tests +top_dir=./ + diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index a2ff14b..0000000 --- a/.testr.conf +++ /dev/null @@ -1,4 +0,0 @@ -[DEFAULT] -test_command=${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 b5cbcf5..e948423 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -8,6 +8,6 @@ fixtures>=3.0.0 # Apache-2.0/BSD mock>=2.0.0 # BSD python-subunit>=1.0.0 # Apache-2.0/BSD sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD -testrepository>=0.0.18 # Apache-2.0/BSD +stestr>=2.0.0 # Apache-2.0 testscenarios>=0.4 # Apache-2.0/BSD testtools>=2.2.0 # MIT diff --git a/tox.ini b/tox.ini index 329d416..35f9cc2 100644 --- a/tox.ini +++ b/tox.ini @@ -11,7 +11,7 @@ deps = -r{toxinidir}/test-requirements.txt install_command = pip install {opts} {packages} commands = - python setup.py testr --slowest --testr-args='{posargs}' + stestr run --slowest {posargs} [tox:jenkins] sitepackages = True @@ -20,8 +20,13 @@ sitepackages = True commands = flake8 [testenv:cover] +setenv = + PYTHON=coverage run --source os_refresh_config --parallel-mode commands = - python setup.py test --coverage --coverage-package-name=os_refresh_config + stestr run '{posargs}' + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml [testenv:venv] commands = {posargs}