From d7f57cf83f2808344ee222b9388f4de664848366 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Tue, 25 Dec 2012 00:02:54 -0600 Subject: [PATCH] Use testr instead of nose. Part of blueprint grizzly-testtools Change-Id: I76dee19781eaac21901b5c0258e83a42180c1702 --- .gitignore | 2 ++ .testr.conf | 4 ++++ setup.cfg | 7 ------- setup.py | 1 - tox.ini | 26 +++++++++++++------------- 5 files changed, 19 insertions(+), 21 deletions(-) create mode 100644 .testr.conf diff --git a/.gitignore b/.gitignore index a74a7b33..e51d7492 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ .coverage +.testrepository +subunit.log .venv *,cover cover diff --git a/.testr.conf b/.testr.conf new file mode 100644 index 00000000..081907d5 --- /dev/null +++ b/.testr.conf @@ -0,0 +1,4 @@ +[DEFAULT] +test_command=${PYTHON:-python} -m subunit.run discover -t ./ ./tests $LISTOPT $IDOPTION +test_id_option=--load-list $IDFILE +test_list_option=--list diff --git a/setup.cfg b/setup.cfg index 34211012..876bc6d5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,10 +1,3 @@ -[nosetests] -verbosity=2 -detailed-errors=1 -cover-package = keystoneclient -cover-erase = true -cover-inclusive = true - [build_sphinx] source-dir = doc/source build-dir = doc/build diff --git a/setup.py b/setup.py index c6a9e6be..8bec3bc7 100644 --- a/setup.py +++ b/setup.py @@ -37,7 +37,6 @@ setuptools.setup( cmdclass=setup.get_cmdclass(), tests_require=tests_require, - test_suite="nose.collector", entry_points={ 'console_scripts': ['keystone = keystoneclient.shell:main'] diff --git a/tox.ini b/tox.ini index 6533a18d..915cab22 100644 --- a/tox.ini +++ b/tox.ini @@ -3,24 +3,24 @@ envlist = py26,py27,pep8 [testenv] 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 + LANG=en_US.UTF-8 + LANGUAGE=en_US:en + LC_ALL=C + OS_STDOUT_NOCAPTURE=False + OS_STDERR_NOCAPTURE=False + deps = -r{toxinidir}/tools/pip-requires -r{toxinidir}/tools/test-requires -commands = nosetests {posargs} - -[tox:jenkins] -downloadcache = ~/cache/pip +commands = python setup.py testr --testr-args='{posargs}' [testenv:pep8] commands = pep8 --repeat --show-source --ignore=E711,E712,E125,E126 --exclude=.venv,.tox,dist,doc . -[testenv:cover] -setenv = NOSE_WITH_COVERAGE=1 - [testenv:venv] commands = {posargs} + +[testenv:cover] +commands = python setup.py testr --coverage --testr-args='{posargs}' + +[tox:jenkins] +downloadcache = ~/cache/pip