diff --git a/.gitignore b/.gitignore index 1c3db87..3240150 100644 --- a/.gitignore +++ b/.gitignore @@ -26,12 +26,10 @@ pip-log.txt # Unit test / coverage reports .coverage .tox -nosetests.xml +.stestr/ # Translations *.mo AUTHORS ChangeLog - -.testrepository diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 0000000..dfc2c49 --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,4 @@ +[DEFAULT] +test_path=./blazarnova/tests +top_dir=./ + diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index fbdb8b6..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 blazarnova $LISTOPT $IDOPTION -test_id_option=--load-list $IDFILE -test_list_option=--list diff --git a/test-requirements.txt b/test-requirements.txt index 2731b28..fe3e83c 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -7,7 +7,7 @@ hacking>=4.0.0,<4.1.0 # Apache-2.0 mock>=3.0.0 # BSD fixtures>=3.0.0 # Apache-2.0/BSD -testrepository>=0.0.20 # Apache-2.0/BSD +stestr>=2.0.0 # Apache-2.0 testtools>=2.2.0 # MIT coverage!=4.4,>=4.0 # Apache-2.0 wsgi-intercept>=1.7.0 # MIT License diff --git a/tox.ini b/tox.ini index 18e138b..34b13e9 100644 --- a/tox.ini +++ b/tox.ini @@ -15,11 +15,18 @@ setenv = VIRTUAL_ENV={envdir} EVENTLET_NO_GREENDNS=yes PYTHONHASHSEED=0 commands = - python setup.py testr --slowest --testr-args="{posargs}" + stestr run --slowest {posargs} sitepackages = False [testenv:cover] -commands = python setup.py testr --coverage --testr-args="{posargs}" +basepython = python3 +setenv = + PYTHON=coverage run --source blazarnova --parallel-mode +commands = + stestr run '{posargs}' + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml [testenv:pep8] commands = flake8 {posargs}