From 64cddfd71592efad6c22ce86cfbb2415395ffbb0 Mon Sep 17 00:00:00 2001 From: Tommy Carpenter Date: Wed, 13 Sep 2017 21:41:50 -0400 Subject: Cleanup tox, add local tox ini Issue-ID: DCAEGEN2-60 Change-Id: I7799b09ddd60ae0a54d96c3071506c79bbeb68cb Signed-off-by: Tommy Carpenter --- .gitignore | 3 ++- README.md | 9 ++------- requirements.txt | 1 - tox-local.ini | 15 +++++++++++++++ tox.ini | 8 +++----- 5 files changed, 22 insertions(+), 14 deletions(-) create mode 100644 tox-local.ini diff --git a/.gitignore b/.gitignore index 8010eea..3bdb964 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,7 @@ pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ +venv-tox/ .tox/ .coverage .coverage.* @@ -91,4 +92,4 @@ ENV/ # Test report xunit-reports -coverage-reports \ No newline at end of file +coverage-reports diff --git a/README.md b/README.md index 04bc382..39c740b 100644 --- a/README.md +++ b/README.md @@ -39,12 +39,7 @@ X's configuration: } ``` -# Tests -Run: +# Tests And Test Coverage ``` -set -x CONSUL_HOST "your_consul_dns_name.somedomain.com"; set -x HOSTNAME "config_binding_service" -cd tests/ -pytest +tox -c tox-local.ini ``` - - diff --git a/requirements.txt b/requirements.txt index 1863f86..9aeb224 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,4 @@ Flask==0.12.2 connexion==1.1.12 requests==2.18.2 -pytest==3.0.3 six==1.10.0 diff --git a/tox-local.ini b/tox-local.ini new file mode 100644 index 0000000..978634d --- /dev/null +++ b/tox-local.ini @@ -0,0 +1,15 @@ +[tox] +envlist = py27,py36 + +[testenv] +deps= + -rrequirements.txt + pytest + coverage + pytest-cov +setenv = + CONSUL_HOST = 8.8.8.8 + HOSTNAME = config_binding_service +commands=pytest --cov {envsitepackagesdir}/config_binding_service --cov-report html + + diff --git a/tox.ini b/tox.ini index cce1b63..3784c17 100644 --- a/tox.ini +++ b/tox.ini @@ -1,16 +1,14 @@ # content of: tox.ini , put in same dir as setup.py [tox] envlist = py27,py35 + [testenv] deps= - Flask - connexion + -rrequirements.txt pytest coverage pytest-cov - requests - six setenv = CONSUL_HOST = 8.8.8.8 HOSTNAME = config_binding_service -commands=pytest --junitxml xunit-reports/xunit-result-configbinding.xml --cov {envsitepackagesdir} --cov-report=xml \ No newline at end of file +commands=pytest --junitxml xunit-reports/xunit-result-configbinding.xml --cov {envsitepackagesdir} --cov-report=xml -- cgit 1.2.3-korg