summaryrefslogtreecommitdiffstats
path: root/robotframework-onap/tox.ini
diff options
context:
space:
mode:
authorumry8364 <morgan.richomme@orange.com>2019-08-28 12:06:30 +0200
committerDR695H <dr695h@att.com>2019-08-28 15:44:21 -0400
commitd4af56d4c2f67a1285da783764f20a0c1c546592 (patch)
tree59e9b8921fe341f36f58168b4365cef2185879a0 /robotframework-onap/tox.ini
parentf2b75da8dd38077c60cc2c852f73092980c1f906 (diff)
Add tox
it would create virtualenv to - run tests in python2.7 and 3 - perform linting operations (flake8, pylint) Issue-ID: INT-1228 Change-Id: I451e1108285f6ebffc650bf3de4f175594ec796d Signed-off-by: umry8364 <morgan.richomme@orange.com> Signed-off-by: DR695H <dr695h@att.com>
Diffstat (limited to 'robotframework-onap/tox.ini')
-rw-r--r--robotframework-onap/tox.ini46
1 files changed, 38 insertions, 8 deletions
diff --git a/robotframework-onap/tox.ini b/robotframework-onap/tox.ini
index bd1bff5..92f6317 100644
--- a/robotframework-onap/tox.ini
+++ b/robotframework-onap/tox.ini
@@ -1,11 +1,41 @@
-# Tox (https://tox.readthedocs.io/) is a tool for running tests
-# in multiple virtualenvs. This configuration file will run the
-# test suite on all supported python versions. To use it, "pip install tox"
-# and then run "tox" from this directory.
-
[tox]
-envlist = py27, py3
+envlist = py3,pep8,pylint,py27
+modules =
+ ONAPLibrary
+ vcpeutils
[testenv]
-commands = {envpython} setup.py test
-deps = \ No newline at end of file
+usedevelop = True
+deps =
+ -r{toxinidir}/requirements.txt
+ -r{toxinidir}/test-requirements.txt
+install_command = pip install {opts} {packages}
+
+[testenv:pep8]
+basepython = python3
+changedir = {toxinidir}
+commands =
+ flake8 --max-line-length 120 {[tox]modules}
+
+[testenv:pylint]
+basepython = python3
+deps =
+ pyflakes
+ pylint
+commands =
+ pylint -f parseable --ignore-imports=y --disable=locally-disabled --max-line-length 120 --exit-zero -ry {[tox]modules}
+
+[testenv:py3]
+basepython = python3
+commands = nosetests --with-xunit \
+ --all-modules \
+ --with-coverage \
+ --cover-tests \
+ --cover-package=. \
+ --cover-xml \
+ --cover-html \
+ tests
+
+[testenv:py27]
+basepython = python2.7
+commands = nosetests --all-modules tests