diff --git a/.coveragerc b/.coveragerc index 894c36896..1b214f324 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,4 +1,5 @@ [run] +branch = True omit = etc/*,setup.py,*egg*,.tox/*,barbican/tests/*,*barbican/openstack/* [report] diff --git a/.testr.conf b/.testr.conf new file mode 100644 index 000000000..0d13a20e0 --- /dev/null +++ b/.testr.conf @@ -0,0 +1,5 @@ +[DEFAULT] +test_command=${PYTHON:-python} -m subunit.run discover -t . $LISTOPT $IDOPTION + +test_id_option=--load-list $IDFILE +test_list_option=--list diff --git a/setup.cfg b/setup.cfg index 58856f2ac..9ab142818 100644 --- a/setup.cfg +++ b/setup.cfg @@ -33,7 +33,7 @@ barbican.test.crypto.plugin = test_crypto = barbican.tests.crypto.test_plugin:TestCryptoPlugin [build_sphinx] -all_files = 1 +all_files = 1 build-dir = doc/build source-dir = doc/source @@ -57,21 +57,9 @@ tag_svn_revision = 0 #mapping_file = babel.cfg #output_file = barbican/locale/barbican.pot -[nosetests] -where=barbican -nocapture=1 -cover-erase=1 -#-with-xunit=1 -#-all-modules=1 -#-traverse-namespace=1 -#with-coverage=1 -cover-package=barbican -#cover-inclusive=1 -cover-branches=1 - # TBD: OpenStack stuff... # NOTE(jkoelker) To run the test suite under nose install the following -# coverage http://pypi.python.org/pypi/coverage +# coverage http://pypi.python.org/pypi/coverage # tissue http://pypi.python.org/pypi/tissue (pep8 checker) # openstack-nose https://github.com/jkoelker/openstack-nose #verbosity=2 diff --git a/test-requirements.txt b/test-requirements.txt index 3e529ab56..492886de0 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,4 +1,4 @@ +coverage>=3.6 hacking>=0.8.0,<0.9 mock>=1.0 -nose -nosexcover +testrepository>=0.0.17 diff --git a/tox.ini b/tox.ini index 52ac63208..26df856f1 100644 --- a/tox.ini +++ b/tox.ini @@ -10,7 +10,9 @@ deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt [testenv:py27] -commands = nosetests {posargs:--with-xcoverage --all-modules --traverse-namespace --with-xunit --cover-package=barbican} +commands = python setup.py testr --coverage + coverage combine + coverage report -m [testenv:coverage] commands = coverage html {posargs:--include="*barbican*"}