diff --git a/.gitignore b/.gitignore index 46b5d5b..9a90fad 100644 --- a/.gitignore +++ b/.gitignore @@ -27,8 +27,7 @@ pip-log.txt # Unit test / coverage reports .coverage .tox -nosetests.xml -.testrepository +.stestr # Translations *.mo diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 0000000..684a532 --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_path=./reviewstats/tests +top_path=./ diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index fb62267..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 \ No newline at end of file diff --git a/test-requirements.txt b/test-requirements.txt index 1b70fc4..e6e9d49 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -3,7 +3,9 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 coverage>=3.6 fixtures>=0.3.14 python-subunit -testrepository>=0.0.17 +sphinx>=1.1.2,<1.2 +oslo.sphinx +stestr>=2.0.0 testscenarios>=0.4,<0.5 testtools>=0.9.32 mock diff --git a/tox.ini b/tox.ini index affae0b..2fb17e6 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:docs] basepython = python3 @@ -24,7 +24,14 @@ commands = flake8 commands = {posargs} [testenv:cover] -commands = python setup.py testr --coverage --testr-args='{posargs}' +commands = + coverage erase + {[testenv]commands} + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml + coverage report --show-missing + [flake8] show-source = True