Browse Source

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>
changes/95/581395/1
Al Bailey 4 years ago
parent
commit
597e7bb29b
  1. 2
      requirements.txt
  2. 3
      test-requirements.txt
  3. 23
      tox.ini

2
requirements.txt

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

3
test-requirements.txt

@ -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

@ -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}'

Loading…
Cancel
Save