From d160d93130cc4ba4a3f77760d86193c6464c0354 Mon Sep 17 00:00:00 2001 From: Uggla Date: Sun, 3 Apr 2016 18:03:41 +0200 Subject: [PATCH] Fix #49, tox can be used by user - Allow user to use tox - Docker is required ! --- .coveragerc | 8 ++++++++ test-requirements.txt | 1 + tox.ini | 16 +++++----------- 3 files changed, 14 insertions(+), 11 deletions(-) create mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..d4ee344 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,8 @@ +[run] +branch = True +source = redfish + redfish-client +omit = redfish/tests/*,redfish-client/tests/* + +[report] +#ignore-errors = True diff --git a/test-requirements.txt b/test-requirements.txt index 2dd9159..ba8c272 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -7,3 +7,4 @@ coverage>=3.6 mock>=1.0.1 docker-py>=1.1.0 path.py>=5.2 +testrepository>=0.0.20 diff --git a/tox.ini b/tox.ini index b804ac9..c7cabd6 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] minversion = 1.6 -envlist = py33,py34,py26,py27,pypy,pep8 +envlist = py34,py27,docs skipsdist = True [testenv] @@ -12,26 +12,20 @@ setenv = VIRTUAL_ENV={envdir} deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = - bash -c "TESTS_DIR=./redfish/tests python setup.py testr --slowest --testr-args='{posargs}'" + py.test redfish-client +# bash -c "TESTS_DIR=./redfish/tests python setup.py testr --slowest --testr-args='{posargs}'" [testenv:pep8] commands = flake8 -[testenv:venv] -commands = {posargs} - -[testenv:cover] -commands = python setup.py testr --coverage --testr-args='{posargs}' +#[testenv:cover] +#commands = python setup.py testr --coverage --testr-args='{posargs}' [testenv:docs] commands = python setup.py build_sphinx -[testenv:debug] -commands = oslo_debug_helper {posargs} - [flake8] # E123, E125 skipped as they are invalid PEP-8. - show-source = True ignore = E123,E125 builtins = _