Implement feature 5949
[osm/RO.git] / osm_ro / http_tools / tox.ini
diff --git a/osm_ro/http_tools/tox.ini b/osm_ro/http_tools/tox.ini
new file mode 100644 (file)
index 0000000..43055c2
--- /dev/null
@@ -0,0 +1,49 @@
+# This tox file allows the devs to run unit tests only for this subpackage.
+# In order to do so, cd into the directory and run `tox`
+
+[tox]
+minversion = 1.8
+envlist = py27,py36,flake8,radon
+skipsdist = True
+
+[testenv]
+changedir = {toxinidir}
+commands =
+    nosetests -d --with-coverage --cover-package=. {posargs:tests}
+deps =
+    WebTest
+    bottle
+    coverage
+    mock
+    nose
+    six
+    PyYaml
+
+[testenv:flake8]
+changedir = {toxinidir}
+deps = flake8
+commands = flake8 {posargs:.}
+
+[testenv:radon]
+changedir = {toxinidir}
+deps = radon
+commands =
+    radon cc --show-complexity --total-average {posargs:.}
+    radon mi -s {posargs:.}
+
+[coverage:run]
+branch = True
+source = {toxinidir}
+omit =
+    tests
+    tests/*
+    */test_*
+    .tox/*
+
+[coverage:report]
+show_missing = True
+
+[flake8]
+exclude =
+    request_processing.py
+    .tox