Adding py27 for nfv

Adds a py27 unit test target for nfv.
The unit tests for nfv were written using nose.

Change-Id: I001995be5f2af1d45242eb3c0e05e0615352b173
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
This commit is contained in:
Al Bailey 2018-07-10 07:58:27 -05:00
parent 76f5066428
commit 597e7bb29b
3 changed files with 27 additions and 1 deletions

2
requirements.txt Normal file
View File

@ -0,0 +1,2 @@
SQLAlchemy!=1.1.5,!=1.1.6,!=1.1.7,!=1.1.8 # MIT
stevedore # Apache-2.0

View File

@ -1,3 +1,6 @@
bashate >= 0.2
PyYAML >= 3.1.0
yamllint >= 0.5.2
# The following are for py27 and py35
mock # BSD
nose # LGPL

23
tox.ini
View File

@ -10,7 +10,10 @@ setenv = VIRTUAL_ENV={envdir}
OS_STDOUT_CAPTURE=1
OS_STDERR_CAPTURE=1
OS_TEST_TIMEOUT=60
deps = -r{toxinidir}/test-requirements.txt
PYTHONDONTWRITEBYTECODE=True
commands = find {toxinidir} -type f -not -path '{toxinidir}/.tox/*' -not -path '*/__pycache__/*' -name '*.py[c|o]' -delete
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
[testenv:linters]
whitelist_externals = bash
@ -60,3 +63,21 @@ commands =
[testenv:venv]
commands = {posargs}
[nosetests]
verbosity=2
[testenv:py27]
basepython = python2.7
deps = {[testenv]deps}
{toxinidir}/nfv/nfv-client
{toxinidir}/nfv/nfv-common
{toxinidir}/nfv/nfv-plugins
{toxinidir}/nfv/nfv-vim
whitelist_externals = cp
find
recreate = True
commands = {[testenv]commands}
cp -v nfv/nfv-tests/nfv_unit_tests/test_data/nfv_vim_db_18.03_GA {envdir}/
nosetests --exe -w nfv/nfv-tests/nfv_unit_tests/tests/ '{posargs}'