aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTommy Carpenter <tommy@research.att.com>2017-09-13 21:41:50 -0400
committerTommy Carpenter <tommy@research.att.com>2017-09-13 21:42:40 -0400
commit64cddfd71592efad6c22ce86cfbb2415395ffbb0 (patch)
tree2322790a8adf2d13169444df78ef30fcbc75b639
parentbe0e8f4847638a2a9c0b54cf3ca19303f86cc76a (diff)
Cleanup tox, add local tox ini
Issue-ID: DCAEGEN2-60 Change-Id: I7799b09ddd60ae0a54d96c3071506c79bbeb68cb Signed-off-by: Tommy Carpenter <tommy@research.att.com>
-rw-r--r--.gitignore3
-rw-r--r--README.md9
-rw-r--r--requirements.txt1
-rw-r--r--tox-local.ini15
-rw-r--r--tox.ini8
5 files changed, 22 insertions, 14 deletions
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