Initial commit
[ta/config-manager.git] / cmframework / tox.ini
diff --git a/cmframework/tox.ini b/cmframework/tox.ini
new file mode 100644 (file)
index 0000000..1d6a05a
--- /dev/null
@@ -0,0 +1,51 @@
+[tox]
+envlist = py27-pytest,pylint
+setupdir=src
+
+[testenv]
+
+basepython = python2.7
+setenv =
+    COVERAGE_FILE = .coverage{envname}
+
+commands = /bin/cp -R {toxinidir}/test/mocked_dependencies/fm {toxworkdir}/py27-pytest/lib/python2.7/site-packages/
+           /bin/cp -R {toxinidir}/test/mocked_dependencies/cmdatahandlers {toxworkdir}/py27-pytest/lib/python2.7/site-packages/
+           /bin/cp -R {toxinidir}/test/mocked_dependencies/dss {toxworkdir}/py27-pytest/lib/python2.7/site-packages/
+           pytest -vv \
+           --basetemp={envtmpdir} \
+           --pep8 \
+           --cov cmframework \
+           --cov-branch \
+           --cov-report term \
+           --cov-report html:htmlcov \
+           {posargs:.}
+
+deps=pytest
+     mock
+     pytest-cov
+     pytest-pep8
+     pytest-flakes
+     eventlet
+     requests
+     more-itertools==5.0.0
+
+[pytest]
+cache_dir = .pytest-cache
+pep8maxlinelength = 100
+
+[testenv:pylint]
+commands = /bin/cp -R {toxinidir}/test/mocked_dependencies/fm {toxworkdir}/pylint/lib/python2.7/site-packages/
+           /bin/cp -R {toxinidir}/test/mocked_dependencies/cmdatahandlers {toxworkdir}/pylint/lib/python2.7/site-packages/
+           /bin/cp -R {toxinidir}/test/mocked_dependencies/dss {toxworkdir}/pylint/lib/python2.7/site-packages/
+           -pylint --rcfile={toxinidir}/.pylintrc {posargs:src}
+
+deps=pylint==1.7.4
+     astroid==1.6.5
+     pymongo
+     requests
+     routes
+     eventlet
+     redis
+     pika
+     pyyaml
+     prettytable