From ee9f9aad99fa70e453b3cbb3b623bf6f24890580 Mon Sep 17 00:00:00 2001 From: MORITA Kazutaka Date: Fri, 18 Apr 2014 15:21:25 +0900 Subject: [PATCH] Use openstack.nose_plugin for tests With this change, we get similar nosetest output as other OpenStack projects do. Change-Id: I0f6692e4cfef04c4fdea8a7a65ad6b73468f7c44 --- setup.cfg | 8 ++++++++ test-requirements.txt | 1 + tox.ini | 10 ++++++++-- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 8079a97e..69b4cefc 100644 --- a/setup.cfg +++ b/setup.cfg @@ -30,3 +30,11 @@ packages = [entry_points] paste.filter_factory = swift3 = swift3.middleware:filter_factory + +[nosetests] +exe = 1 +verbosity = 2 +detailed-errors = 1 +cover-package = swift3 +cover-html = true +cover-erase = true diff --git a/test-requirements.txt b/test-requirements.txt index 79fc4242..96f52260 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,4 +1,5 @@ hacking sphinx nose +openstack.nose_plugin coverage diff --git a/tox.ini b/tox.ini index 8b24d2f2..a9e2452a 100644 --- a/tox.ini +++ b/tox.ini @@ -11,6 +11,14 @@ deps = -r{toxinidir}/test-requirements.txt commands = nosetests {posargs:swift3/test/unit} 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 + NOSE_WITH_COVERAGE=1 + NOSE_COVER_BRANCHES=1 [testenv:pep8] commands = flake8 @@ -22,10 +30,8 @@ commands = {posargs} setenv = VIRTUAL_ENV={envdir} NOSE_WITH_COVERAGE=1 NOSE_COVER_BRANCHES=1 - NOSE_COVER_PACKAGE=swift3 NOSE_COVER_HTML=1 NOSE_COVER_HTML_DIR={toxinidir}/cover - NOSE_COVER_ERASE=1 [tox:jenkins] downloadcache = ~/cache/pip