diff --git a/.gitignore b/.gitignore index 8cd4512c..c54147fa 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ venv .*.swp .DS_Store .testrepository +.stestr/* versioninfo var/* ChangeLog diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 00000000..d781bca0 --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,4 @@ +[DEFAULT] +test_path=${OS_TEST_PATH:-./tests/} +top_dir=./ +group_regex=([^\.]+\.)+ diff --git a/lower-constraints.txt b/lower-constraints.txt index bb45018e..d17d9a97 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -33,9 +33,6 @@ msgpack-python==0.4.0 munch==2.1.0 netaddr==0.7.18 netifaces==0.10.4 -nose==1.3.7 -nose-exclude==0.3.0 -openstack.nose-plugin==0.7 openstackdocstheme==1.18.1 openstacksdk==0.11.2 os-client-config==1.28.0 @@ -62,7 +59,7 @@ pytz==2013.6 PyYAML==3.12 reno==2.5.0 requests==2.14.2 -requests-mock==1.1.0 +requests-mock==1.2.0 requestsexceptions==1.2.0 rfc3986==0.3.1 simplejson==3.5.1 @@ -70,9 +67,9 @@ six==1.10.0 snowballstemmer==1.2.1 Sphinx==1.6.5 sphinxcontrib-websupport==1.0.1 +stestr==1.0.0 stevedore==1.20.0 termcolor==1.1.0 -testrepository==0.0.18 testtools==2.2.0 traceback2==1.4.0 unittest2==1.1.0 diff --git a/test-requirements.txt b/test-requirements.txt index edc74147..d0f6f0f1 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -7,13 +7,10 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 # Unit testing fixtures>=3.0.0 # Apache-2.0/BSD mock>=2.0.0 # BSD -testrepository>=0.0.18 # Apache-2.0/BSD testtools>=2.2.0 # MIT # Test runner -nose>=1.3.7 # LGPL -nose-exclude>=0.3.0 # LGPL -openstack.nose-plugin>=0.7 # Apache-2.0 +stestr>=1.0.0 # Apache-2.0 # Metrics and style coverage!=4.4,>=4.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index c179eaac..e9f5213f 100644 --- a/tox.ini +++ b/tox.ini @@ -8,19 +8,15 @@ usedevelop = True # Customize pip command, add -U to force updates. install_command = pip install {opts} {packages} setenv = VIRTUAL_ENV={envdir} - NOSE_WITH_OPENSTACK=1 - NOSE_OPENSTACK_COLOR=1 - NOSE_OPENSTACK_RED=0.05 - NOSE_OPENSTACK_YELLOW=0.025 - NOSE_OPENSTACK_SHOW_ELAPSED=1 - NOSE_OPENSTACK_STDOUT=1 + OS_STDOUT_CAPTURE=1 + OS_STDERR_CAPTURE=1 + OS_TEST_TIMEOUT=60 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = find . -type f -name "*.pyc" -delete - nosetests {posargs} - + stestr run {posargs} whitelist_externals = find [tox:jenkins] @@ -31,7 +27,12 @@ commands = flake8 [testenv:cover] setenv = {[testenv]setenv} - NOSE_WITH_COVERAGE=1 + PYTHON=coverage run --source zaqarclient --parallel-mode +commands = + stestr -q run {posargs} + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml [testenv:venv] commands = {posargs}