diff --git a/.gitignore b/.gitignore index 4408f32..2fd4bd5 100644 --- a/.gitignore +++ b/.gitignore @@ -15,7 +15,7 @@ coverage.xml *.py[co] .DS_Store *.log -.testrepository +.stestr/ subunit.log .eggs AUTHORS @@ -29,4 +29,4 @@ ChangeLog .coverage.* releasenotes/build -.vscode/ \ No newline at end of file +.vscode/ diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 0000000..fab1db6 --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,4 @@ +[DEFAULT] +test_path=./freezerclient/tests/unit +top_dir=./ + diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index 731601c..0000000 --- a/.testr.conf +++ /dev/null @@ -1,9 +0,0 @@ -[DEFAULT] -test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \ - OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \ - OS_LOG_CAPTURE=${OS_LOG_CAPTURE:-1} \ - ${PYTHON:-python} -m subunit.run discover -s ${OS_TEST_PATH:-./freezerclient/tests/unit} -t . $LISTOPT $IDOPTION - -test_id_option=--load-list $IDFILE -test_list_option=--list -group_regex=([^\.]+\.)+ diff --git a/lower-constraints.txt b/lower-constraints.txt index 6352a7d..7d44eff 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -40,12 +40,13 @@ pytz==2013.6 PyYAML==3.12 reno==2.5.0 requests==2.14.2 +setuptools==21.0.0 six==1.10.0 snowballstemmer==1.2.1 Sphinx==1.6.5 sphinxcontrib-websupport==1.0.1 stevedore==1.20.0 -testrepository==0.0.18 +stestr==2.0.0 testtools==2.2.0 traceback2==1.4.0 unittest2==1.1.0 diff --git a/test-requirements.txt b/test-requirements.txt index 610ecbc..d05e3e6 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -6,5 +6,5 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 mock>=2.0.0 # BSD pylint==1.4.5 # GPLv2 -testrepository>=0.0.18 # Apache-2.0/BSD +stestr>=2.0.0 # Apache-2.0 testtools>=2.2.0 # MIT diff --git a/tox.ini b/tox.ini index ea47a46..fdd750e 100644 --- a/tox.ini +++ b/tox.ini @@ -10,7 +10,19 @@ deps = -r{toxinidir}/test-requirements.txt install_command = pip install {opts} {packages} -setenv = VIRTUAL_ENV={envdir} +setenv = + VIRTUAL_ENV={envdir} + PYTHON=coverage run --source freezerclient --parallel-mode + OS_TEST_PATH = ./freezerclient/tests/unit +commands = + find . -type f -name "*.py[c|o]" -delete + stestr run '{posargs}' + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml + coverage report -m + rm -f .coverage + rm -rf .testrepository whitelist_externals = find @@ -25,36 +37,12 @@ commands = {posargs} [testenv:py27] basepython = python2.7 -setenv = - OS_TEST_PATH = ./freezerclient/tests/unit -commands = - find . -type f -name "*.py[c|o]" -delete - python setup.py testr --coverage --testr-args="{posargs}" - coverage report -m - rm -f .coverage - rm -rf .testrepository [testenv:py35] basepython = python3.5 -setenv = - OS_TEST_PATH = ./freezerclient/tests/unit -commands = - find . -type f -name "*.py[c|o]" -delete - python setup.py testr --coverage --testr-args="{posargs}" - coverage report -m - rm -f .coverage - rm -rf .testrepository [testenv:py36] basepython = python3.6 -setenv = - OS_TEST_PATH = ./freezerclient/tests/unit -commands = - find . -type f -name "*.py[c|o]" -delete - python setup.py testr --coverage --testr-args="{posargs}" - coverage report -m - rm -f .coverage - rm -rf .testrepository [testenv:docs] deps = -r{toxinidir}/doc/requirements.txt