From 92e30f10cf0f3e769d397d813d0b468002a25b72 Mon Sep 17 00:00:00 2001 From: Nikita Konovalov Date: Wed, 11 Dec 2013 16:50:53 +0400 Subject: [PATCH] Migrating to testr Unit Tests and coverage will be launched using testr now. Change-Id: Ib7397181de1137b94bb791cc532384c69679dcda Fixes: bug #1259921 --- .gitignore | 2 ++ test-requirements.txt | 2 ++ tox.ini | 5 +++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index f32c161..c082b3b 100644 --- a/.gitignore +++ b/.gitignore @@ -42,5 +42,7 @@ tools/lintstack.head.py tools/pylint_exceptions savanna/tests/cover savanna/tests/coverage.xml +cover htmlcov savanna/openstack/common/db/savanna.sqlite +.testrepository diff --git a/test-requirements.txt b/test-requirements.txt index 4de7868..ca17674 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,6 +1,7 @@ hacking>=0.8.0,<0.9 coverage>=3.6 +discover docutils==0.9.1 fixtures>=0.3.14 mock>=1.0 @@ -10,6 +11,7 @@ oslo.sphinx pylint==0.25.2 sphinx>=1.1.2,<1.2 sphinxcontrib-httpdomain +testrepository>=0.0.17 unittest2 python-savannaclient>=0.4.0 diff --git a/tox.ini b/tox.ini index b60a871..6eff151 100644 --- a/tox.ini +++ b/tox.ini @@ -18,7 +18,7 @@ setenv = deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -commands = nosetests -w unit {posargs} +commands = python setup.py test --slowest --testr-args="{posargs}" [testenv:integration] setenv = @@ -33,7 +33,8 @@ setenv = commands = nosetests -w integration -x {posargs} [testenv:cover] -setenv = NOSE_WITH_COVERAGE=1 +VIRTUAL_ENV={envdir} +commands = python setup.py testr --coverage --testr-args='{posargs}' [tox:jenkins] downloadcache = ~/cache/pip