diff --git a/.gitignore b/.gitignore index 66a72cb..571281b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ *.pyc -.testrepository/ +.stestr/ .tox *.egg-info/ *.egg diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 0000000..0fee8de --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_path=./refstack_client/tests/unit +top_dir=./ diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index 68a05a5..0000000 --- a/.testr.conf +++ /dev/null @@ -1,4 +0,0 @@ -[DEFAULT] -test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 coverage run -m subunit.run discover -t ./ -s ./refstack_client/tests/unit $LISTOPT $IDOPTION -test_id_option=--load-list $IDFILE -test_list_option=--list diff --git a/test-requirements.txt b/test-requirements.txt index 0ad075c..92c5310 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,7 +4,7 @@ flake8==2.0 docutils>=0.11 # OSI-Approved Open Source, Public Domain # required to build documentation sphinx>=1.6.2 # BSD -testrepository>=0.0.18 +stestr>=1.1.0 # Apache-2.0 testtools>=0.9.34 mock coverage diff --git a/tox.ini b/tox.ini index 83683a6..a6c7fd4 100644 --- a/tox.ini +++ b/tox.ini @@ -12,8 +12,8 @@ setenv = VIRTUAL_ENV={envdir} LC_ALL=C deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -commands = /bin/rm -f .testrepository/times.dbm - python setup.py testr --testr-args='{posargs}' +commands = + stestr --test-path ./refstack_client/tests/unit run {posargs} distribute = false [testenv:pep8] @@ -25,13 +25,14 @@ distribute = false commands = {posargs} [testenv:cover] -commands = coverage run \ - --include './refstack_client/*' \ - --omit './refstack_client/tests*' \ - -m testtools.run discover refstack_client.tests.unit - coverage report - coverage html -d cover - /bin/rm .coverage +commands = + coverage erase + find . -type f -name "*.pyc" -delete + stestr --test-path ./refstack_client/tests run {posargs} + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml + coverage report [testenv:docs] commands = python setup.py build_sphinx {posargs}