From bc90b3e088d3d4b83b5b3de0f9f83d9b6956947d Mon Sep 17 00:00:00 2001 From: Michael Basnight Date: Mon, 17 Jun 2013 23:47:43 -0700 Subject: [PATCH] Migrate to testr. Change-Id: I497fc21a0795b8921f989d7a00b6a73f7730cd22 --- .gitignore | 1 + .testr.conf | 8 ++++++++ {tests => reddwarfclient/tests}/test_accounts.py | 0 {tests => reddwarfclient/tests}/test_auth.py | 0 {tests => reddwarfclient/tests}/test_base.py | 0 {tests => reddwarfclient/tests}/test_client.py | 0 {tests => reddwarfclient/tests}/test_common.py | 0 {tests => reddwarfclient/tests}/test_instances.py | 0 {tests => reddwarfclient/tests}/test_limits.py | 0 {tests => reddwarfclient/tests}/test_management.py | 0 {tests => reddwarfclient/tests}/test_secgroups.py | 0 {tests => reddwarfclient/tests}/test_users.py | 0 {tests => reddwarfclient/tests}/test_utils.py | 0 {tests => reddwarfclient/tests}/test_xml.py | 0 test-requirements.txt | 8 +++----- tox.ini | 4 ++-- 16 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 .testr.conf rename {tests => reddwarfclient/tests}/test_accounts.py (100%) rename {tests => reddwarfclient/tests}/test_auth.py (100%) rename {tests => reddwarfclient/tests}/test_base.py (100%) rename {tests => reddwarfclient/tests}/test_client.py (100%) rename {tests => reddwarfclient/tests}/test_common.py (100%) rename {tests => reddwarfclient/tests}/test_instances.py (100%) rename {tests => reddwarfclient/tests}/test_limits.py (100%) rename {tests => reddwarfclient/tests}/test_management.py (100%) rename {tests => reddwarfclient/tests}/test_secgroups.py (100%) rename {tests => reddwarfclient/tests}/test_users.py (100%) rename {tests => reddwarfclient/tests}/test_utils.py (100%) rename {tests => reddwarfclient/tests}/test_xml.py (100%) diff --git a/.gitignore b/.gitignore index 41564f04..686023c5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *.pyc +.testrepository .tox/* dist/* build/* diff --git a/.testr.conf b/.testr.conf new file mode 100644 index 00000000..8f0b5973 --- /dev/null +++ b/.testr.conf @@ -0,0 +1,8 @@ +[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 . $LISTOPT $IDOPTION + +test_id_option=--load-list $IDFILE +test_list_option=--list diff --git a/tests/test_accounts.py b/reddwarfclient/tests/test_accounts.py similarity index 100% rename from tests/test_accounts.py rename to reddwarfclient/tests/test_accounts.py diff --git a/tests/test_auth.py b/reddwarfclient/tests/test_auth.py similarity index 100% rename from tests/test_auth.py rename to reddwarfclient/tests/test_auth.py diff --git a/tests/test_base.py b/reddwarfclient/tests/test_base.py similarity index 100% rename from tests/test_base.py rename to reddwarfclient/tests/test_base.py diff --git a/tests/test_client.py b/reddwarfclient/tests/test_client.py similarity index 100% rename from tests/test_client.py rename to reddwarfclient/tests/test_client.py diff --git a/tests/test_common.py b/reddwarfclient/tests/test_common.py similarity index 100% rename from tests/test_common.py rename to reddwarfclient/tests/test_common.py diff --git a/tests/test_instances.py b/reddwarfclient/tests/test_instances.py similarity index 100% rename from tests/test_instances.py rename to reddwarfclient/tests/test_instances.py diff --git a/tests/test_limits.py b/reddwarfclient/tests/test_limits.py similarity index 100% rename from tests/test_limits.py rename to reddwarfclient/tests/test_limits.py diff --git a/tests/test_management.py b/reddwarfclient/tests/test_management.py similarity index 100% rename from tests/test_management.py rename to reddwarfclient/tests/test_management.py diff --git a/tests/test_secgroups.py b/reddwarfclient/tests/test_secgroups.py similarity index 100% rename from tests/test_secgroups.py rename to reddwarfclient/tests/test_secgroups.py diff --git a/tests/test_users.py b/reddwarfclient/tests/test_users.py similarity index 100% rename from tests/test_users.py rename to reddwarfclient/tests/test_users.py diff --git a/tests/test_utils.py b/reddwarfclient/tests/test_utils.py similarity index 100% rename from tests/test_utils.py rename to reddwarfclient/tests/test_utils.py diff --git a/tests/test_xml.py b/reddwarfclient/tests/test_xml.py similarity index 100% rename from tests/test_xml.py rename to reddwarfclient/tests/test_xml.py diff --git a/test-requirements.txt b/test-requirements.txt index 16b030aa..c1b2eb67 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,12 +4,10 @@ pyflakes==0.7.2 flake8==2.0 hacking>=0.5.3,<0.6 -nose>=1.2.1 -nosexcover>=1.0.7 -openstack.nose_plugin>=0.11 +discover sphinx>=1.1.2 -unittest2>=0.5.1 -testtools +testrepository>=0.0.13 +testtools>=0.9.29 # This used to be but openstack/requirements is set to [below]. # If this breaks we 1) fix tests to use [below] or # 2) petition to use mock>=1.0.1 diff --git a/tox.ini b/tox.ini index bbebce7c..9332b140 100644 --- a/tox.ini +++ b/tox.ini @@ -12,7 +12,7 @@ setenv = VIRTUAL_ENV={envdir} NOSE_OPENSTACK_SHOW_ELAPSED=1 deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -commands = nosetests +commands = python setup.py testr --testr-args='{posargs}' [testenv:pep8] commands = flake8 @@ -21,7 +21,7 @@ commands = flake8 commands = {posargs} [testenv:cover] -commands = nosetests --cover-erase --cover-package=reddwarfclient --with-xcoverage +commands = python setup.py testr --coverage --testr-args='{posargs}' [testenv:docs] -deps =