From ee231b97dbb139ae31d9967b8f3a8ac9611256b0 Mon Sep 17 00:00:00 2001 From: Dimitrios Markou Date: Wed, 9 May 2018 14:49:27 +0300 Subject: Create unit tests for 'cleanup.py' module This is the first attempt to add unit testing capabilities to OPNFV/SFC project. Also we are following the contraints.txt logic which helps in the direction of simulating a test env which will be as much as close to the real env that the SFC testcases are running. Jira: SFC-127 Jira: SFC-129 Change-Id: I938d28f9f85614cdefa163949c4ec9f06f5d27b4 Signed-off-by: Dimitrios Markou --- tox.ini | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'tox.ini') diff --git a/tox.ini b/tox.ini index e038b61d..4ec7b2f7 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = docs,docs-linkcheck +envlist = docs,docs-linkcheck,py27 skipsdist = True [testenv] @@ -7,6 +7,12 @@ usedevelop = False setenv= HOME = {envtmpdir} PYTHONPATH = {toxinidir} +deps = + -chttps://raw.githubusercontent.com/openstack/requirements/stable/queens/upper-constraints.txt + -chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=master + -r{toxinidir}/test-requirements.txt + -r{toxinidir}/requirements.txt +install_command = pip install {opts} {packages} [testenv:docs] deps = -r{toxinidir}/docs/requirements.txt @@ -18,3 +24,12 @@ whitelist_externals = echo [testenv:docs-linkcheck] deps = -r{toxinidir}/docs/requirements.txt commands = sphinx-build -b linkcheck -d {envtmpdir}/doctrees ./docs {toxinidir}/docs/_build/linkcheck + +[testenv:py27] +commands = nosetests --with-xunit \ + --with-coverage \ + --cover-tests \ + --cover-package=sfc \ + --cover-xml \ + --cover-html \ + sfc/unit_tests/unit -- cgit 1.2.3-korg